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

test: improve integration testing #30

Merged
merged 5 commits into from
Jan 22, 2024
Merged

Conversation

decanTyme
Copy link
Owner

@decanTyme decanTyme commented Jan 20, 2024

Sticking with a Jest electron runner (@kayahr/jest-electron-runner) for the foreseeable future. It should be sufficient enough for the features it uses, which is mostly the Canvas API. The only caveat is that it can't use browsers other than electron (chromium), which the name suggests.

Vitest Browser Mode (@vitest/browser) was supposed to be the preferred alternative because of its ability to utilize multiple browsers, which makes it the closest to the Karma + Jasmine pipeline. Unfortunately, it doesn't have a (easy) way to make files (for fixtures) available for access in the browser. At least for now.

Closes #20.

@decanTyme
Copy link
Owner Author

decanTyme commented Jan 20, 2024

Took a bit more tinkering than expected. The runner would refuse to run, and the job would go on forever without the use of xvfb due to a Missing X server or $DISPLAY error. This is apparently common in headless runs. Somehow also had some minor differences (that would fail the whole thing) when rendering in Ubuntu vs in Windows which I had to manually check via WSL2. All in all, LGTM.

@decanTyme decanTyme merged commit 1b4cbb0 into main Jan 22, 2024
2 checks passed
@decanTyme decanTyme deleted the fix/20-tests-improvements branch January 23, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve tests
1 participant