vendure-ecommerce / ngx-translate-extract

Extract translatable (using ngx-translate) strings and save as a JSON or Gettext pot file
MIT License
51 stars 19 forks source link

chore: migrate tests to vitest #40

Closed pmpak closed 8 months ago

pmpak commented 8 months ago

Hello @michaelbromley

As I was checking the bug from #37 the warnings in the console as seeing below while running the tests caught my attention

(node:13764) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:13764) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.

I realized that dropping vitest in would require minimal effort since in has chai built-in and gave it a quick try. Indeed, Vitest worked completely out of the box with the only requirement was to add the imports (describe, expect, etc.) in the spec files. That means:

no mocharc.json and in general no config since the repo has a very lean setup.

Reduced dependencies:

michaelbromley commented 8 months ago

Very nice! I'm a big fan of Vitest (moved our main Vendure repo over from Jest last year) and I'm an even bigger fan of removing dependencies so this PR is 👌