Skip to content

Commit

Permalink
Update Jest
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Apr 30, 2021
1 parent 5cf0f3f commit b249832
Show file tree
Hide file tree
Showing 5 changed files with 8,194 additions and 6,093 deletions.
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This setting is used only to transform ESM while running Jest.
module.exports = {
presets: [['@babel/env', { targets: { node: 'current' } }]],
}
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const esModules = ['unist-util-visit', 'unist-util-is']

module.exports = {
clearMocks: true,
collectCoverageFrom: ['src/**/*.ts', 'src/**/*.js'],
coveragePathIgnorePatterns: ['/node_modules/', '.*\\.d\\.ts'],
coverageThreshold: { global: { lines: 95 } },
preset: 'ts-jest/presets/js-with-babel',
restoreMocks: true,
testEnvironment: 'node',
transformIgnorePatterns: [`/node_modules/(?!${esModules.join('|')})`],
}
Loading

0 comments on commit b249832

Please sign in to comment.