Cannot read property 'match' of undefined at testing polymer

314 views Asked by At

I'm trying to run tests using polymer CLI in the command line using $ polymer test, but i'm getting this error:

TypeError: Cannot read property 'match' of undefined

error:  cli runtime exception: TypeError: Cannot read property 'match' of undefined
error:  TypeError: Cannot read property 'match' of undefined
    at firefox (/usr/local/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:126:46)
    at Object.<anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:88:38)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)

I've tried to follow the official docs about component testing, but i'm afraid they don't say anything about this.

About the tests on browser, like running $ polymer serve and going to my test folder url like localhost:8081/components/my-component/test, it is ok and i can see all my tests running fine.

I've tried to run using $ polymer test -l chrome, and also searched for questions and issues like this but i can't find any solution to that problem.

Info: I'm using polymer 3, as in my dependencies:

"dependencies": {
    "@polymer/font-roboto": "^3.0.2",
    "@polymer/iron-icons": "^3.0.1",
    "@polymer/paper-item": "^3.0.1",
    "@polymer/paper-listbox": "^3.0.1",
    "@polymer/paper-slider": "^3.0.1",
    "@polymer/paper-spinner": "^3.0.1",
    "@polymer/polymer": "^3.1.0",
    "@vaadin/vaadin-context-menu": "^4.2.0"
  },
  "devDependencies": {
    "@polymer/iron-demo-helpers": "^3.0.0-pre.19",
    "@polymer/test-fixture": "^4.0.2",
    "@webcomponents/webcomponentsjs": "^2.2.0",
    "chai": "^4.2.0",
    "mocha": "^5.2.0",
    "sinon": "^7.2.2",
    "wct-mocha": "^1.0.0"
  }
0

There are 0 answers