End to end tests suite.
@vittel/e2e/
βββ .vscode/ # vscode debug config
βββ src/ # e2e package source code
β βββ *.test.ts # end-to-end test files
β βββ stub.test.ts # stub unit test file
βββ babel.config.js # local babel config
βββ jest-puppeteer.config.js # jest-puppeteer config file
βββ jest.config.js # local jest config
βββ package.json # e2e package dependencies and tasks
βββ tsconfig.json # local tsconfigbuild: does not build anything but required for CI/CD orchestration, do not remove.docker:build: does not build anything but required for CI/CD orchestration, do not remove.
Required shell variables for package.json scripts
| variable | usage |
|---|---|
ENV_DIR |
Directory for dotenv config files |
NODE_ENV |
Run node in development or production mode |
- The value for each variable must be consistent across all scripts.
- None.
- Caution : ALL monorepo packages have to be included as dependencies, except other e2e packages.
- This is mandatory for the CI/CD pipeline to fail if any build asset fails to validate end-to-end tests.
ENV_DIRandNODE_ENVpoint to the production config file of@vittel/backend.- Additional variables for
dotenvconfigs may be added if the tests involve multiple node based services. NODE_ENVshould always be set toproductionsince end to end tests run against production builds.src/stub.test.tsshould not be removed so thetesttask does not fail if no other test files exist.- Since the
jestsyntax conflicts with thetypedocsyntax, e2e packages cannot be documented at all.