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

[TECH] Ajouter des tests pour LogosZone. #183

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

sbedeau
Copy link
Contributor

@sbedeau sbedeau commented Oct 5, 2020

🦄 Problème

LogosZone n'est pas testé

🤖 Solution

Ajouter des tests

🌈 Remarques

jest converti systématiquement les booléens en strings. jest-community/jest-junit#110

Pour contourner le problème, il faut déclarer un objet (merci @MelanieMEB 🙇)

Il faut donc retenir qu'avec jest

// solution à choisir
process.env = {
  isPixSite: false,
  isPixPro: true,
}

ne donne pas le même résultat que

// non fonctionnel car le booléen est converti en string
process.env.isPixSite = false
process.env.isPixPro = true

✨ Review App

https://site-pr000.review.pix.fr/
https://pro-pr000.review.pix.fr/

@sbedeau sbedeau added 👀 Tech Review Needed team-evaluation PR relatives à l'expérience d'évaluation labels Oct 5, 2020
tests/components/slices/LogosZone.test.js Outdated Show resolved Hide resolved
tests/components/slices/LogosZone.test.js Outdated Show resolved Hide resolved
nuxt.config.js Outdated Show resolved Hide resolved
@sbedeau sbedeau force-pushed the tech-add-tests-to-logos-zone branch from 31aa3a4 to 3ab19d8 Compare October 6, 2020 08:44
@sbedeau sbedeau force-pushed the tech-add-tests-to-logos-zone branch from 3ab19d8 to 64e798d Compare October 7, 2020 15:21
@sbedeau sbedeau changed the title [TECH] Ajouter des tests pour LogosZone et refacto de la variable d'env site. [TECH] Ajouter des tests pour LogosZone. Oct 7, 2020
@sbedeau sbedeau merged commit 142bfcf into dev Oct 7, 2020
@sbedeau sbedeau deleted the tech-add-tests-to-logos-zone branch October 7, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Ready to Merge team-evaluation PR relatives à l'expérience d'évaluation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants