decanTyme / chartjs-plugin-tailwindcss-colors

Use TailwindCSS to colorize your Chart.js components!
https://www.npmjs.com/package/chartjs-plugin-tailwindcss-colors
MIT License
3 stars 0 forks source link

test: improve integration testing #30

Closed decanTyme closed 9 months ago

decanTyme commented 9 months ago

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 commented 9 months ago

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.