mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
532a10f9f5
* Adding browser outdated notification * updating dependency * adding unit tests for util function * adding unit tests for selectors, lintfix * Added Tests, refactored notification delay logic * lint:fix * adding test coverage for method parameter * Update app/scripts/controllers/app-state.js adding documentation details Co-authored-by: Mark Stacey <markjstacey@gmail.com> * moving declaration into test * Update app/scripts/controllers/app-state.test.js spacing in test file Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update jest.config.js removing duplicate entries Co-authored-by: Mark Stacey <markjstacey@gmail.com> * using async submitRequestToBackground method * removing unused import * removing unnecessary link syntax in notification * adding opera and edge and associated tests * handling the undefined case in bowser.satisfies * setOutdatedBrowserWarningLastShown try/catch * lint:fix * Removing try/catch and letting errors bubble up Removing deprecated displayWarning method Co-authored-by: Mark Stacey <markjstacey@gmail.com> * taking out forceMetamaskUpdateState call * excludint app-state test from mocha test suite * Added note: Jest files should match Mocha excluded * syntax error, lint:fix --------- Co-authored-by: Mark Stacey <markjstacey@gmail.com>
60 lines
2.1 KiB
JavaScript
60 lines
2.1 KiB
JavaScript
module.exports = {
|
|
collectCoverageFrom: [
|
|
'<rootDir>/app/scripts/constants/error-utils.js',
|
|
'<rootDir>/app/scripts/controllers/network/**/*.js',
|
|
'<rootDir>/app/scripts/controllers/permissions/**/*.js',
|
|
'<rootDir>/app/scripts/flask/**/*.js',
|
|
'<rootDir>/app/scripts/lib/**/*.js',
|
|
'<rootDir>/app/scripts/lib/createRPCMethodTrackingMiddleware.js',
|
|
'<rootDir>/app/scripts/migrations/*.js',
|
|
'<rootDir>/app/scripts/platforms/*.js',
|
|
'<rootDir>/shared/**/*.(js|ts|tsx)',
|
|
'<rootDir>/ui/**/*.(js|ts|tsx)',
|
|
],
|
|
coverageDirectory: './coverage',
|
|
coveragePathIgnorePatterns: ['.stories.js', '.snap'],
|
|
coverageReporters: ['json'],
|
|
reporters: [
|
|
'default',
|
|
[
|
|
'jest-junit',
|
|
{
|
|
outputDirectory: 'test/test-results/',
|
|
outputName: 'junit.xml',
|
|
},
|
|
],
|
|
],
|
|
// TODO: enable resetMocks
|
|
// resetMocks: true,
|
|
restoreMocks: true,
|
|
setupFiles: [
|
|
'<rootDir>/test/setup.js',
|
|
'<rootDir>/test/env.js',
|
|
'<rootDir>/test/jest/env.js', // jest specific env vars that break mocha tests
|
|
],
|
|
setupFilesAfterEnv: ['<rootDir>/test/jest/setup.js'],
|
|
testMatch: [
|
|
'<rootDir>/app/scripts/constants/error-utils.test.js',
|
|
'<rootDir>/app/scripts/controllers/app-state.test.js',
|
|
'<rootDir>/app/scripts/controllers/network/**/*.test.js',
|
|
'<rootDir>/app/scripts/controllers/permissions/**/*.test.js',
|
|
'<rootDir>/app/scripts/flask/**/*.test.js',
|
|
'<rootDir>/app/scripts/lib/**/*.test.js',
|
|
'<rootDir>/app/scripts/lib/createRPCMethodTrackingMiddleware.test.js',
|
|
'<rootDir>/app/scripts/migrations/*.test.js',
|
|
'<rootDir>/app/scripts/platforms/*.test.js',
|
|
'<rootDir>/shared/**/*.test.(js|ts)',
|
|
'<rootDir>/ui/**/*.test.(js|ts|tsx)',
|
|
],
|
|
testTimeout: 2500,
|
|
// We have to specify the environment we are running in, which is jsdom. The
|
|
// default is 'node'. This can be modified *per file* using a comment at the
|
|
// head of the file. So it may be worthwhile to switch to 'node' in any
|
|
// background tests.
|
|
testEnvironment: 'jsdom',
|
|
testEnvironmentOptions: {
|
|
customExportConditions: ['node', 'node-addons'],
|
|
},
|
|
workerIdleMemoryLimit: '500MB',
|
|
};
|