cli: add ESM support to Jest config + tests

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-12-23 11:33:44 +01:00
parent f01b5739e6
commit 47407fc34c
10 changed files with 278 additions and 81 deletions
+5 -5
View File
@@ -49,8 +49,8 @@
"storybook": "yarn ./storybook run storybook",
"techdocs-cli": "node scripts/techdocs-cli.js",
"techdocs-cli:dev": "cross-env TECHDOCS_CLI_DEV_MODE=true node scripts/techdocs-cli.js",
"test": "NODE_OPTIONS=--no-node-snapshot backstage-cli repo test",
"test:all": "NODE_OPTIONS=--no-node-snapshot backstage-cli repo test --coverage",
"test": "NODE_OPTIONS='--no-node-snapshot --experimental-vm-modules' backstage-cli repo test",
"test:all": "NODE_OPTIONS='--no-node-snapshot --experimental-vm-modules' backstage-cli repo test --coverage",
"test:e2e": "NODE_OPTIONS=--no-node-snapshot playwright test",
"tsc": "tsc",
"tsc:full": "backstage-cli repo clean && tsc --skipLibCheck false --incremental false"
@@ -84,6 +84,9 @@
]
},
"prettier": "@backstage/cli/config/prettier",
"jest": {
"rejectFrontendNetworkRequests": true
},
"resolutions": {
"@changesets/assemble-release-plan@^6.0.0": "patch:@changesets/assemble-release-plan@npm%3A6.0.0#./.yarn/patches/@changesets-assemble-release-plan-npm-6.0.0-f7b3005037.patch",
"@material-ui/pickers@^3.2.10": "patch:@material-ui/pickers@npm%3A3.3.11#./.yarn/patches/@material-ui-pickers-npm-3.3.11-1c8f68ea20.patch",
@@ -134,9 +137,6 @@
"sort-package-json": "^2.8.0",
"typescript": "~5.2.0"
},
"jest": {
"rejectFrontendNetworkRequests": true
},
"packageManager": "yarn@3.8.1",
"engines": {
"node": "20 || 22"