-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
embroider ember-try scenarios #308
Conversation
d9aba83
to
2f58ea3
Compare
tests pass manually, but I need to fix testem integration still.
|
e82f784
to
943c1cd
Compare
943c1cd
to
ed979a8
Compare
Interesting, tests pass locally fine. I guess I need to dig in.... |
Alright QUnit works now in testem mode. Unfortunately It looks like (in CI only as far as I can tell), we are attempting to register a webpack AMD style module (with only 1 argument) to a loader.js loader. The error (in CI only so far) is:
|
I can reproduce the (1) the failure (2) the test timeout by running env CI=true yarn ember try:one embroider-safe ... currently debugging |
note: This fixes an embroider related issue, where when IE11 was included as a build target (in CI mode) es6-promise, babel, and webpack didn’t get along. (As described [here](embroider-build/embroider#731 (comment)))
The issue was basically: embroider-build/embroider#677 (comment) although my approach to fix it was different.
|
@@ -3,21 +3,22 @@ | |||
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); | |||
|
|||
module.exports = function (defaults) { | |||
let app = new EmberAddon(defaults, { | |||
autoImport: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this, if we include qunit via auto-import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason we had this here was that we weren't sure of broad auto-import support at the time of writing. Makes sense if it's better supported now.
|
||
app.import('node_modules/qunit/qunit/qunit.css', { | ||
type: 'test', | ||
}); | ||
|
||
app.import('vendor/shims/qunit.js', { type: 'test' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use auto-import instead
app.import('vendor/shims/qunit.js', { type: 'test' }); | ||
|
||
return app.toTree(); | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is verbose, because this library cannot yet drop node 10 and instead requires @embroider/test-support
be provided via the ember-try-scenario configuration
@@ -85,6 +84,7 @@ | |||
"loader.js": "^4.7.0", | |||
"npm-run-all": "^4.1.5", | |||
"prettier": "^2.2.1", | |||
"promise-polyfill": "^8.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- now matches
@ember/test-helpers
polyfill - works around ie11 + es6-promise + babel + webpack "glitch" that causes some fun to debug issues.
call `Application.create(...)` on it. Additionally, applications can opt-out of this behavior by | ||
setting `autoRun` to `false` in their `ember-cli-build.js` | ||
*/ | ||
runningTests = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mimic @ember/test-helpers
</div> | ||
|
||
<script src="/testem.js" integrity=""></script> | ||
<script src="/testem.js" integrity="" data-embroider-ignore></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures embroider doesn't warn that it can't find this, as this is a dynamic files provided by a middleware which shouldn't and cannot be bundled.
This enables embroider-safe ember-try scenario