Closed mjuniper closed 7 years ago
@mjuniper temporary workaround:
bower install jquery#2.1.4 && ember t -s
If the jQuery update worked for you @mjuniper could you verify and close the issue? Thanks!
Well, it did work but I don't understand why. Also, at ember 2.3+ (I think) you are not supposed to need to have jquery in your bower.json at all.
Well, that is just weird. I'll test a little further on this one before closing it.
Also, at ember 2.3+ (I think) you are not supposed to need to have jquery in your bower.json at all.
This is correct.
I'll test a little further on this one before closing it.
I would suggest keeping the issue open until a proper fix is in place.
I would suggest keeping the issue open until a proper fix is in place.
I agree. Thanks @jrowlingson
This is really weird. Testing in Ember 2.4.3 and jQuery default install is 2.2.2, which breaks testem
w/addon. Just going back to 2.1.4 does fix it, but I don't know why. Scripts are still loaded in same order, nothing jumps out.
I'll keep cracking away at it, thanks!
I think I got to the bottom of this issue (at least for Backoffice). Briefly, I needed to reverse the order in which assets/test-loader.js
and assets/test-support.js
are referenced in tests/index.html
.
Longer description from workforce-js#1294 (comment):
This change seems to resolve the issue described in Esri/ember-cli-amd#24. In short, I noticed that
test-support.js
loads modules out oftest-loader.js
-- despitetest-loader
getting pulled in aftertest-support
. However,test-support
loads the modules in adomready
handler, so the problem was masked (w/ jQuery < 2.2) becausetest-loader
is pulled in time. I noticed jQuery >= 2.2 changed itsjQuery.ready()
implementation, so I'm guessing it sped things up so thatrequire
no longer had enough time to pull in all the deps beforedomready
was fired.
EDIT: Inline the comment because it's in a private repo.
I see that ember-cli
loads test-loader
after test-support
by default. I wonder if a better fix for this issue is to load the script resources in tests/index.html
in parallel rather than serially (unless there's a reason to do it this way?) -- and use Require's shim config to indicate the order in which to load test-support
and test-loader
?
FYI for anyone look at this issue now: This issues doesn't appear to exist with the latest version of Ember (2.10 is what I'm trying with). Ember has updated its QUint test suite to version 2 since this bug was filed so that may have removed the issue.
In ember 2.4.1, the addon works, however, the tests break.
When I do
ember test -s
, I see: