1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/jest.config.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

37 lines
813 B
JavaScript

// https://jestjs.io/docs/en/configuration.html
const isBrowser = process.env.BROWSER
const isActions = Boolean(process.env.GITHUB_ACTIONS)
module.exports = {
coverageThreshold: {
global: {
branches: 95,
functions: 95,
lines: 95,
statements: -5
}
},
preset: isBrowser
? 'jest-puppeteer'
: undefined,
reporters: isActions
? ['default', 'jest-github-actions-reporter']
: ['default'],
modulePathIgnorePatterns: [
'assets/'
],
setupFilesAfterEnv: ['jest-expect-message'],
...isBrowser ? {} : { testEnvironment: 'node' },
testPathIgnorePatterns: [
'node_modules/',
'vendor/',
'tests/helpers.js',
...isBrowser ? [] : ['tests/browser/browser.js']
],
testMatch: [
'**/tests/**/*.js'
],
testLocationInResults: isActions
}