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

Improve tests #20

Closed decanTyme closed 9 months ago

decanTyme commented 1 year ago

For now, only parser/util unit tests have been in place. Actual integration tests are still not yet implemented (aside from the very basic ones) as I haven't had much time to investigate how this might look like. I'm thinking of making this more of a high priority now before moving on with more advanced features.

Chart.js seems to have released their own homegrown test utils (chartjs-test-utils) but it is designed around Karma and Jasmine, and I have no plans to part with Jest for now.

decanTyme commented 1 year ago

So I've (kinda) succeeded in adapting chartjs-test-utils to a purely Jest runner, though it won't be able to run in multiple browsers at this point —which I guess should be fine, considering I'm only testing if colors show up as specified. It's made out of a custom Jest runner/environment and only runs in Electron. I'm still wondering if I should release it separately or just include it here since there's also a more promising test framework with a first-class browser runner coming up, but I don't think it'll be out (and be relatively stable) in a few months' time.