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
migrate nodeunit to jasmine #1336
migrate nodeunit to jasmine #1336
Conversation
4520ce7
to
46b796b
Compare
What do you think about using Jest? |
While I have a general tendency to like Jest, I haven't really worked with it yet - while migrating the karma specs I did a small research and read it would be quite painful to have Jest running in a Browser environment via Karma. |
Jest would have been the way to go IMHO, but since Axios is running most of the tests in several browsers and karma-jest is not a thing yet (see jestjs/jest#848) we have to go for something else. I would be totally in to migrate to jest as soon they properly support karma/running it in the browser. Would even be kind of a no brainer thanks to wonderful https://github.com/skovhus/jest-codemods |
What about using Jest + Puppeteer? |
Puppeteer would give us only a chromium backend while the lib still should be checked in IE, Edge, FF and so on. For local testing puppeteer could be a good option to speed things up. |
Jest also does not support the browser testing |
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.
Looks great overall, only one comment
test/unit/adapters/http.js
Outdated
|
||
axios.get('http://localhost:4444/', { | ||
try { | ||
await axios.get(testUri, { |
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.
Using async
await
will require us to use different configs than the library which may introduce some confusion.
It would be nice to use Promises
for now. To align the feature use across the library
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.
Great job
To sync the test tools we have, this PR migrates from nodeunit to jasmine for the http adapter to have the jasmine framework as only test framework.
Requires #1335 to be merged first, probably also needs upgrading the Karma tests too
Part of #1333