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
Add Karma browser testing for the API tests #461
Conversation
7f71a06
to
8843bda
Compare
Had to fix some linting errors and do some CI config modification, but this is now running through and should be ready for review. |
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 good, thanks. I'm now on mobile however, will try to run locally when I'm behind the laptop.
8843bda
to
67d5d0b
Compare
Rebased this. |
Hi @s1na, since this is not touching any production code and improvements can easily be done on top, I would admin-merge this now, then Jacky can do subsequent test work on top and directly consider this along with his new tests. I will also set the browser tests to being "required" for CI to pass from now on. |
Makes sense. Sorry for not testing in time... |
No problem. 😄 |
This PR adds browser API testing to the VM.
It uses a Karma setup similar to the one in the tx library, adds a new npm script command
testAPI:browser
and integrates into CI.This should help prevent issues like #457. I tested this specific case by injecting the error in a matching test and this would actually break the test run.
There were many files not running through and after some experimenting I decided not to try to fix since this seemed to be too much which would have to be addressed. Instead this PR provides the ground for further fixes by providing an initial list of running + excluded test files in the Karma configuration (
karma.conf.js
). File runs can then fixed case-by-case by opening separate PRs.One exception to the non-fix approach is that I replaced
promisify
in the test files with a fitting polyfill/shim where it fixed the tests.