-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate alert push notification tests (#1735)
Automate alert push notification tests
- Loading branch information
Showing
7 changed files
with
428 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Use JEST_PROJECT to switch between normal tests and end-to-end | ||
// tests. | ||
// See https://github.com/facebook/jest/issues/7542 for more information | ||
// and to see if this features has been integrated into Jest directly. | ||
const JEST_PROJECT = process.env.JEST_PROJECT | ||
|
||
module.exports = { | ||
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'], | ||
moduleDirectories: ['node_modules', '<rootDir>/src', '<rootDir>'], | ||
moduleNameMapper: { | ||
'\\.(png|gif|jpe?g|svg)$': '<rootDir>/test/__mocks__/fileMock.js', | ||
styl$: 'identity-obj-proxy', | ||
webapp$: 'identity-obj-proxy', | ||
'!!raw-loader!(.*)': '$1', | ||
css$: 'identity-obj-proxy', | ||
'^cozy-client$': 'cozy-client/dist/index' | ||
}, | ||
snapshotSerializers: ['enzyme-to-json/serializer'], | ||
testPathIgnorePatterns: [ | ||
'node_modules', | ||
'src/targets/mobile/', | ||
JEST_PROJECT === 'e2e' ? null : '.*\\.e2e\\.spec\\.js' | ||
].filter(Boolean), | ||
testMatch: [ | ||
JEST_PROJECT === 'e2e' ? null : '**/?(*.)(spec).js?(x)', | ||
JEST_PROJECT === 'e2e' ? '**/?(*.)(e2e.spec).js?(x)' : null | ||
].filter(Boolean), | ||
transform: { | ||
'^.+\\.jsx?$': 'babel-jest', | ||
'\\.css$': '<rootDir>/test/readFileESM.js', | ||
'\\.styl$': '<rootDir>/test/readFileESM.js', | ||
'\\.hbs$': '<rootDir>/test/readFileESM.js' | ||
}, | ||
transformIgnorePatterns: [ | ||
'node_modules/(?!(cozy-harvest-lib|cozy-ui|cozy-client|cozy-notifications))' | ||
], | ||
globals: { | ||
__ALLOW_HTTP__: false, | ||
__TARGET__: 'browser', | ||
__DEV__: false, | ||
__POUCH__: false, | ||
__SENTRY_TOKEN__: 'token', | ||
cozy: {} | ||
}, | ||
setupFiles: ['jest-localstorage-mock', './test/jest.setup.js'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.