Skip to content

Commit

Permalink
chore(e2e): E2E API tests to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jan 2, 2025
1 parent 4c76ae0 commit 77e8b21
Show file tree
Hide file tree
Showing 26 changed files with 436 additions and 169 deletions.
4 changes: 3 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"test:debug": "DEBUG_LOG=true pnpm test",
"lint": "eslint './tests/**/*.{js,ts}' && prettier -c ./tests",
"lint:fix": "eslint --fix './tests/**/*.{js,ts}' && prettier -w ./tests",
"check": "tsc && pnpm lint",
"check": "pnpm check:api && pnpm check:ui && pnpm lint",
"check:api": "tsc --project './tests/api-driven/tsconfig.json' && pnpm lint",
"check:ui": "tsc --project './tests/ui-driven/tsconfig.json' && pnpm lint",
"postinstall": "cd tests/ui-driven && pnpm install && cd ../api-driven && pnpm install",
"prepare": "cd .. && husky install e2e/.husky"
},
Expand Down
5 changes: 2 additions & 3 deletions e2e/tests/api-driven/cucumber.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"default": {
"requireModule": ["ts-node/register"],
"require": ["src/env.ts", "src/**/*.ts"],
"loader": ["ts-node/esm"],
"import": ["src/env.ts", "src/**/*.ts"],
"paths": ["src/**/*.feature"],
"format": ["summary"],
"publishQuiet": true,
"formatOptions": {
"snippetInterface": "async-await"
}
Expand Down
4 changes: 3 additions & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"test": "cucumber-js --tags 'not @regression'",
"test:regression": "cucumber-js"
},
"type": "module",
"packageManager": "pnpm@8.6.6",
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@cucumber/cucumber": "^11.1.1",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#a7ec46d",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
Expand All @@ -17,6 +18,7 @@
"nock": "^13.3.1"
},
"devDependencies": {
"@types/jsonwebtoken": "^9.0.7",
"@types/lodash.zipobject": "^4.1.7",
"@types/node": "18.16.1",
"ts-node": "^10.9.1",
Expand Down
Loading

0 comments on commit 77e8b21

Please sign in to comment.