-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Setup addon tests #171
Setup addon tests #171
Conversation
Blocked by tomdale/ember-cli-addon-tests#198 and Workarounds:
|
@Turbo87 @stefanpenner @rwjblue This is green now, can you review? |
pkg.devDependencies['ember-cli-fastboot'] = '*'; | ||
// These 2 are in ember-fetch's package.json, symlinking to dummy won't help resolve | ||
pkg.devDependencies['abortcontroller-polyfill'] = '*'; | ||
pkg.devDependencies['node-fetch'] = '*'; |
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'm not sure I understand. Why are these needed?
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.
See this PR, Fastboot.requrie
is reading from node_modules/node-fetch
but it's under node_modules/ember-fetch/node-fetch
when symlink.
test/fastboot-test.js
Outdated
|
||
let app; | ||
|
||
before(function() { |
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 should use beforeEach()
so that the tests can't leak state
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.
Thanks, changed
test/fastboot-build-test.js
Outdated
|
||
let app; | ||
|
||
before(function() { |
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 should use beforeEach()
so that the tests can't leak state
|
||
loadInitializers(App, config.modulePrefix); | ||
|
||
export default App; |
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.
where are these fixture
files being used?
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.
These are used by ember-cli-addon-tests
to copy over generated new app. It's same setup as https://github.com/ember-fastboot/ember-cli-fastboot/tree/master/test
fcf0c9a
to
cef993a
Compare
use npm run instead of yarn in travis to work around tomdale/ember-cli-addon-tests#198
@@ -32,7 +32,7 @@ jobs: | |||
script: | |||
- yarn lint:js | |||
- yarn test | |||
- yarn test:node | |||
- npm run test:node |
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.
Why change this to npm?
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 a known issue tomdale/ember-cli-addon-tests#198, should be fixed by a WIP PR tomdale/ember-cli-addon-tests#105
Introduce ember-cli-addon-tests to test:
ember-cli-fastboot
hasdist/ember-fetch/fastboot-fetch.js
builtember-cli-fastboot
renders fetched content