Skip to content

Commit

Permalink
Merge pull request #827 from wheresrhys/rhys/jest-wrapper
Browse files Browse the repository at this point in the history
feat: new @fetch-mock/jest wrapper
  • Loading branch information
wheresrhys authored Aug 31, 2024
2 parents 106bacf + 023cac3 commit 0565e32
Show file tree
Hide file tree
Showing 15 changed files with 1,154 additions and 373 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ jobs:
- *workspace
- run: npx playwright install
- run: npm run test:browser
test-jest:
<<: *nodelts
steps:
- *workspace
- run: npm run test:jest
- store_test_results:
path: test-results
module-compat:
<<: *nodelts
steps:
Expand Down Expand Up @@ -132,13 +139,17 @@ workflows:
- test-node18:
<<: *triggerable-by-tag
<<: *after-build-test-lint
- test-jest:
<<: *triggerable-by-tag
<<: *after-build-test-lint
- module-compat:
<<: *triggerable-by-tag
<<: *after-build-lint
- publish:
requires:
- test-node18
- test-browser
- test-jest
- build
- test
- lint
Expand Down
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: 'node',
transform: {
'^.+.tsx?$': ['ts-jest', {}],
},
moduleNameMapper: {
'@fetch-mock/core': '<rootDir>/packages/core/dist/cjs/index.js',
},
};
Loading

0 comments on commit 0565e32

Please sign in to comment.