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

test: start converting unit tests over to ESM-friendly tests #562

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { defaultsESM as tsjPreset } from 'ts-jest/presets'

const config: JestConfigWithTsJest = {
testMatch: [
'**/__tests__/**/*.test.ts',
// TODO: put this back when all unit tests are converted
// '**/__tests__/**/*.test.ts',
'**/__tests__/lib/(a*|t*|u*|v*).test.ts',
],
setupFilesAfterEnv: ['jest-extended/all'],
collectCoverageFrom: ['src/**/*.ts'],
Expand Down
124 changes: 101 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"eventsource": "^2.0.2",
"express": "^4.18.2",
"get-port-please": "^3.1.1",
"inquirer": "^8.2.6",
"inquirer": "^9.2.11",
"js-yaml": "^4.1.0",
"jszip": "^3.10.1",
"lodash.at": "^4.6.0",
Expand All @@ -83,7 +83,7 @@
"@commitlint/config-conventional": "^17.7.0",
"@types/eventsource": "^1.1.12",
"@types/express": "^4.17.18",
"@types/inquirer": "^8.2.7",
"@types/inquirer": "^9.0.6",
"@types/jest": "^29.5.5",
"@types/js-yaml": "^4.0.6",
"@types/lodash.at": "^4.6.7",
Expand Down Expand Up @@ -122,9 +122,9 @@
"watch": "tsc -b -w --sourceMap",
"build": "npm run clean && npm run compile && npm run readme",
"debug-build": "npm run clean && tsc -b --sourceMap && npm run readme",
"test": "jest",
"test-watch": "jest --watch --reporters=default",
"test-coverage": "jest --coverage=true",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test-watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch --reporters=default",
"test-coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage=true",
"prepack": "tsc -b && echo TODO:readme",
"version": "echo TODO:readme && git add README.md && changeset version && npm i --package-lock-only && npm run build && npm run version -w packages/cli",
"release": "npm run build && changeset publish",
Expand Down
Loading