Skip to content
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

Cut over from phantomJS to Karma. #432

Merged
merged 5 commits into from
Mar 17, 2022
Merged

Cut over from phantomJS to Karma. #432

merged 5 commits into from
Mar 17, 2022

Conversation

Bonkles
Copy link
Contributor

@Bonkles Bonkles commented Mar 17, 2022

This PR is based off the work done in openstreetmap/iD#8764 in the iD repo.

Notable changes: Since we're using esm now we had to rename the karma.config.js to karma.config.cjs. Also, the karma-remap-istanbul plugin was not compatible and caused the test to fail as it couldn't generate coverage data correctly, causing karma to hang and an exit code of 1 instead of 0.

This PR also pulls in the config changes we made to get node 16 working with the json import type assertions.

Screenshot of build action test results:

image

Succesful run from the staging branch based off this PR: https://github.com/facebookincubator/RapiD/actions/runs/1999797869

@Bonkles Bonkles closed this Mar 17, 2022
@Bonkles Bonkles reopened this Mar 17, 2022
@Bonkles Bonkles merged commit 15e8655 into main Mar 17, 2022
@Bonkles Bonkles deleted the karma-switch branch March 17, 2022 18:56
Bonkles added a commit that referenced this pull request Mar 17, 2022
* Merge iD pull request #8764 into RapiD, replacing phantomjs with karma

* Further fixes to get unit tests working.

* Ditch the karma-remap-istanbul package, as it did not work in RapiD. Code coverage report seems unaffected.

* Fix import assertion error now that we're using node 16.

* Use import assertions syntax for importing JSON files
Requires node 16.14 and up going forward

Co-authored-by: Martin Raifer <martin@raifer.tech>
Co-authored-by: Bryan Housel <bhousel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants