Skip to content

Commit

Permalink
Remove old browser (headless) tests (#37433)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored Jun 2, 2023
1 parent fcf1657 commit bc960c6
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 1,940 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/browser-test.yml

This file was deleted.

5 changes: 1 addition & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// https://jestjs.io/docs/en/configuration.html

const isBrowser = process.env.BROWSER
const isActions = Boolean(process.env.GITHUB_ACTIONS)

const reporters = ['default']
Expand All @@ -18,22 +17,20 @@ export default {
statements: -5,
},
},
preset: isBrowser ? 'jest-puppeteer' : undefined,
moduleNameMapper: {
// fix for "Unexpected token 'export'" error when running jest
'@primer/behaviors': '<rootDir>/node_modules/@primer/behaviors/dist/cjs/index.js',
},
reporters,
modulePathIgnorePatterns: ['assets/'],
setupFilesAfterEnv: ['./jest.setup.js', 'jest-expect-message'],
...(isBrowser ? {} : { testEnvironment: 'node' }),
testEnvironment: 'node',
testPathIgnorePatterns: [
'node_modules/',
'vendor/',
'tests/fixtures/',
'tests/helpers/',
'tests/javascripts/',
...(isBrowser ? [] : ['tests/browser/browser.js']),
],
testMatch: ['**/tests/**/*.js'],
testLocationInResults: isActions,
Expand Down
Loading

0 comments on commit bc960c6

Please sign in to comment.