Skip to content

Commit

Permalink
test: more wrangling of jest test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Aug 30, 2024
1 parent 93f35c6 commit d6940bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
moduleNameMapper: {
'@fetch-mock/core': '<rootDir>/packages/core'
}
testEnvironment: 'node',
transform: {
'^.+.tsx?$': ['ts-jest', {}],
},
moduleNameMapper: {
'@fetch-mock/core': '<rootDir>/packages/core/dist/cjs/index.js',
},
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"docs": "npm run start -w docs",
"test": "vitest . --ui --exclude=packages/jest/src/__tests__/*",
"test:ci": "vitest . --reporter=junit --outputFile=test-results/junit.xml --coverage.provider=istanbul --exclude=packages/jest/src/__tests__/*",
"test:jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js packages/jest",
"test:browser": "vitest . --browser.enabled --browser.name chromium --browser.provider playwright",
"test:jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js packages/jest --watch",
"test:browser": "vitest . --browser.enabled --browser.name chromium --browser.provider playwright --exclude=packages/jest/src/__tests__/*",
"coverage:send": "cat ./coverage/lcov.info | coveralls",
"compat:module": "npm run compat:module -w import-compat"
},
Expand Down
1 change: 1 addition & 0 deletions packages/jest/src/jest-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function scopeExpectationNameToMethod(name: string, humanVerb: string): string {
const extensions = Object.fromEntries(
Object.entries(methodlessExtensions).map(([name, func]) => [
scopeExpectationNameToMethod(name, humanVerb),
//@ts-expect-error
scopeExpectationFunctionToMethod(func, method),
]),
);
Expand Down

0 comments on commit d6940bc

Please sign in to comment.