Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Tech: regroupe les test unitaires dans un sous-dossier
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnix committed Apr 28, 2022
1 parent 2b5c9c5 commit f731d34
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"timeago.js": "4.0.2"
},
"scripts": {
"test": "mocha --color --require @babel/register src/scripts/tests/",
"test": "mocha --color --require @babel/register src/scripts/tests/unit/",
"test:coverage": "nyc npm run test",
"test-integration": "mocha --color --require @babel/register --bail --timeout 0 src/scripts/tests/integration/",
"test-integration:ci": "mocha --color --require @babel/register --bail --timeout 15000 --retries=5 src/scripts/tests/integration/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Profil from '../profil'
import Profil from '../../profil'

export function createProfil({
symptomes_actuels = false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from 'chai'
import { JSDOM } from 'jsdom'

import * as affichage from '../affichage'
import * as affichage from '../../affichage'

describe('Affichage', function () {
it('On peut masquer des éléments visibles', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assert } from 'chai'

import { joursAvant } from '../utils'
import AlgorithmeDeconfinement from '../algorithme/deconfinement'
import { joursAvant } from '../../utils'
import AlgorithmeDeconfinement from '../../algorithme/deconfinement'

import Profil from '../profil'
import Profil from '../../profil'

describe('Algorithme déconfinement', function () {
describe('Quarantaine pour tous', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assert } from 'chai'

import { joursAvant } from '../utils'
import { joursAvant } from '../../utils'

import Profil from '../profil'
import Profil from '../../profil'

describe('Algorithme dépistage', function () {
describe('Prise en compte d’un test positif', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assert } from 'chai'

import { joursAvant } from '../utils'
import AlgorithmeOrientation from '../algorithme/orientation'
import Profil from '../profil'
import { joursAvant } from '../../utils'
import AlgorithmeOrientation from '../../algorithme/orientation'
import Profil from '../../profil'

describe('Frise chronologique sur l’isolement', function () {
describe('Pas de frise', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assert } from 'chai'

import AlgorithmeSuivi from '../algorithme/suivi'
import AlgorithmeSuivi from '../../algorithme/suivi'

import Profil from '../profil'
import Profil from '../../profil'

describe('Algorithme auto-suivi', function () {
describe('Gravité', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assert } from 'chai'

import AlgorithmeOrientation from '../algorithme/orientation'
import AlgorithmeVaccination from '../algorithme/vaccination'
import { joursAvant } from '../utils'
import AlgorithmeOrientation from '../../algorithme/orientation'
import AlgorithmeVaccination from '../../algorithme/vaccination'
import { joursAvant } from '../../utils'

import Profil from '../profil'
import Profil from '../../profil'

describe('Vaccination', function () {
describe('Pas de Covid passée', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assert } from 'chai'
import { JSDOM } from 'jsdom'

import { cacherElementsConditionnels } from '../page/conseils'
import { joursAvant } from '../utils'
import Profil from '../profil'
import { cacherElementsConditionnels } from '../../page/conseils'
import { joursAvant } from '../../utils'
import Profil from '../../profil'

describe('Conseils personnels', function () {
it('Je n’ai pas d’activité pro', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert } from 'chai'

import ICS from '../ics'
import ICS from '../../ics'

describe('ICS', function () {
it('On génère un ics sans rrule', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { assert } from 'chai'
import { JSDOM } from 'jsdom'

import AlgorithmeOrientation from '../algorithme/orientation'
import AlgorithmeOrientation from '../../algorithme/orientation'

import * as injection from '../injection'
import * as injection from '../../injection'

import Profil from '../profil'
import Profil from '../../profil'

describe('Injection', function () {
describe('Caractéristiques à risques', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from 'chai'

import Profil from '../profil'
import { joursAvant } from '../utils'
import Profil from '../../profil'
import { joursAvant } from '../../utils'

describe('Profil', function () {
it('Le nom du profil n’est pas échappé', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { assert } from 'chai'

import { Questionnaire } from '../questionnaire'
import { Questionnaire } from '../../questionnaire'

import {
beforeSuiviIntroduction,
beforeSuiviSymptomes,
beforeSuiviHistorique,
} from '../questionnaire'
} from '../../questionnaire'

import Profil from '../profil'
import Profil from '../../profil'

const questionnaire = new Questionnaire()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assert } from 'chai'

import { Router } from '../router'
import Profil from '../profil'
import { Questionnaire } from '../questionnaire'
import { Router } from '../../router'
import Profil from '../../profil'
import { Questionnaire } from '../../questionnaire'

class FakeApp {
// Juste ce qu’il faut pour ces tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { itParam } from 'mocha-param'

import { createProfil } from './helpers'

import AlgorithmeOrientation from '../algorithme/orientation'
import { joursAvant } from '../utils'
import AlgorithmeOrientation from '../../algorithme/orientation'
import { joursAvant } from '../../utils'

// On parcourt tous les cas possibles par colonnes.
const matrice = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert } from 'chai'

import Updater from '../updater'
import Updater from '../../updater'

describe('Updater', function () {
it('La page d’introduction n’est pas interactive', function () {
Expand Down

0 comments on commit f731d34

Please sign in to comment.