You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mocha phantom addon coverage issue in master causing a global error. #32
ember-cli: 2.7.0
node: 0.12.6
os: darwin x64
phantomjs: 1.9.8
I (accidentally) tried out the current master and started having a problem with a global error. After a bit of digging it seems that f2ba0e8 causes a broken test on a fresh addon, with just ember-cli-mocha installed when running Coverage=true ember test
ok 1 PhantomJS 1.9 - JSHint | app.js should pass jshint
ok 2 PhantomJS 1.9 - JSHint | helpers/destroy-app.js should pass jshint
ok 3 PhantomJS 1.9 - JSHint | helpers/module-for-acceptance.js should pass jshint
ok 4 PhantomJS 1.9 - JSHint | helpers/resolver.js should pass jshint
ok 5 PhantomJS 1.9 - JSHint | helpers/start-app.js should pass jshint
ok 6 PhantomJS 1.9 - JSHint | resolver.js should pass jshint
ok 7 PhantomJS 1.9 - JSHint | router.js should pass jshint
ok 8 PhantomJS 1.9 - JSHint | test-helper.js should pass jshint
not ok 9 PhantomJS 1.9 - Global error: INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. at http://localhost:7357/8472/tests/index.html?hidepassed, line 48
---
Log: |
{ type: 'error',
text: 'INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. at http://localhost:7357/8472/tests/index.html?hidepassed, line 48\n' }
After a quick look at the changes in the commit mentioned above, I found that by removing:
Removing those lines will mean that coverage does not get written.
For a workaround for now, I highly recommend not using Phantom. These kinds of issues where Phantom behaves differently than any real browser crop up all the time and it's just not worth the time to debug them when no end-user is using Phantom as a browser.
Activity
kategengler commentedon Sep 15, 2016
Removing those lines will mean that coverage does not get written.
For a workaround for now, I highly recommend not using Phantom. These kinds of issues where Phantom behaves differently than any real browser crop up all the time and it's just not worth the time to debug them when no end-user is using Phantom as a browser.
rwjblue commentedon Sep 15, 2016
Can you
console.log(data)to see if it is somehow invalid (I'm thinking of escaping issues or something from Mocha)?GCheung55 commentedon Sep 18, 2016
Maybe try seeing if it's reproducible in Safari?
rwjblue commentedon Oct 7, 2016
I believe this was fixed in #43 (thanks to @dfreeman's excellent sleuthing skills).