ember-cli: Tests failing on PhantomJS but not Chrome in 2.13.0 (that all passed in prior versions)
ember version --verbose && npm --version && yarn --version
ember-cli: 2.13.0
http_parser: 2.7.0
node: 6.10.2
v8: 5.1.281.98
uv: 1.9.1
zlib: 1.2.11
ares: 1.10.1-DEV
icu: 58.2
modules: 48
openssl: 1.0.2k
os: darwin x64
3.10.10
0.23.2
PhantomJS is 2.1.1
Any component(model, etc) that does import _ from ‘lodash’; now fails under testing only in PhantomJS. Example failure:
not ok 326 PhantomJS 2.1 - Unit | Serializer | vendor device: it serializes records
---
actual: >
null
expected: >
null
stack: >
http://localhost:7357/assets/vendor.js:150785:50
http://localhost:7357/assets/vendor.js:155188:24
baseRest@http://localhost:7357/assets/vendor.js:150678:47
createAssigner@http://localhost:7357/assets/vendor.js:152018:44
http://localhost:7357/assets/vendor.js:156262:54
exports@http://localhost:7357/assets/vendor.js:119:37
_reify@http://localhost:7357/assets/vendor.js:153:66
reify@http://localhost:7357/assets/vendor.js:140:33
exports@http://localhost:7357/assets/vendor.js:117:15
_reify@http://localhost:7357/assets/vendor.js:153:66
reify@http://localhost:7357/assets/vendor.js:140:33
exports@http://localhost:7357/assets/vendor.js:117:15
requireModule@http://localhost:7357/assets/vendor.js:34:25
_extractDefaultExport@http://localhost:7357/assets/vendor.js:139015:27
resolveOther@http://localhost:7357/assets/vendor.js:138731:53
superWrapper@http://localhost:7357/assets/vendor.js:65861:27
resolve@http://localhost:7357/assets/vendor.js:30213:47
_setupIsolatedContainer@http://localhost:7357/assets/test-support.js:10157:66
setupContainer@http://localhost:7357/assets/test-support.js:9989:39
http://localhost:7357/assets/test-support.js:8550:32
initializePromise@http://localhost:7357/assets/vendor.js:73244:15
Promise@http://localhost:7357/assets/vendor.js:73732:50
nextStep@http://localhost:7357/assets/test-support.js:8549:51
invokeSteps@http://localhost:7357/assets/test-support.js:8556:24
setup@http://localhost:7357/assets/test-support.js:8503:32
beforeEach@http://localhost:7357/assets/test-support.js:8311:46
callHook@http://localhost:7357/assets/test-support.js:3331:26
runHook@http://localhost:7357/assets/test-support.js:3325:15
advance@http://localhost:7357/assets/test-support.js:2957:26
begin@http://localhost:7357/assets/test-support.js:4648:27
http://localhost:7357/assets/test-support.js:3842:11
message: >
Promise rejected before "it serializes records": Object is not a constructor (evaluating '(0, _lodash_defineProperty['default'])')
Log: |
Bonus Weirdness: Also – I can alternate between ember test (always fails) followed by an ember test -s and get the phantomjs tests to pass (chrome always pass) There are exactly 0 Ember.run’s etc in the codebase 😃 (and again, they all pass on my 2.12.2 and 2.12.3 branches)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 23 (14 by maintainers)
@rwjblue I managed to get a reproduction app here: https://github.com/josemarluedke/ember-lodash-define-property-babel-polyfill
It seems that it starts breaking when adding the babel polyfill with:
Will be fixed by https://github.com/mike-north/ember-lodash/pull/104. Many hours have been spent on this 😭 .
Huge thanks to @rwjblue @simonihmig @josemarluedke and anyone else who solved this. It must have been a bear to track down.
mike-north/ember-lodash#105 fixed my issue! //cc @rwjblue @simonihmig
@josemarluedke 's repro presents the same symptom as my web app:
Object is not a constructor (evaluating '(0, _lodash_defineProperty['default'])')@rwjblue (ping) we have a repro now!
Glad thats behind us 😩
Cross linking https://github.com/mike-north/ember-lodash/pull/105