-
Notifications
You must be signed in to change notification settings - Fork 40
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
Migration jest => vitest WIP #4806
base: main
Are you sure you want to change the base?
Conversation
3314332
to
cc3caad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super travail, merci @Shamzic .
Juste quelques petites questions mais sur le fond ok.
Il y a aussi la question de la vulnérabilité avec glob mais bon c'est pour du test, ça devrait le faire.
@@ -109,7 +125,7 @@ describe("benefit descriptions", function () { | |||
.replace(/\s\s+/g, " ") | |||
.trim() | |||
expect(innerText.length).toBeGreaterThanOrEqual(10) | |||
expect(innerText.length).toBeLessThanOrEqual(420) | |||
expect(innerText.length).toBeLessThanOrEqual(550) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu as fait un upgrade par rapport à mes aides vélos ?
environment: "jsdom", | ||
include: ["tests/**/*.spec.ts"], | ||
exclude: [ | ||
"tests/unit/views/fiscales.spec.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi les exclure ?
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_PATH=. jest --testTimeout=20000", | ||
"test": "NODE_OPTIONS='--max-old-space-size=4096' vitest run --pool=forks --poolOptions.threads.singleThread", | ||
"test:coverage": "vitest run --coverage", | ||
"test:ui": "vitest --ui", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La commande ne fonctionne pas, j'ai du installer @vitest/ui mais il ne trouve pas la dépendance. Je propose de le supprimer
Suite aux difficulté de compatibilité de Jest avec la version de vue 3.5, je propose de migrer les tests unitaires avec la lib Vitest qui me semble plus à jour et car c'est aussi la recommandation par défaut du framework.
À investiguer: