Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable @typescript-eslint/no-var-requires */
const jestExpoPreset = require('jest-expo/jest-preset');
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
module.exports = {
...jestExpoPreset,
clearMocks: true,
transform: {
...tsJestPreset.transform,
...jestExpoPreset.transform,
},
testMatch: [
'**/*.test.ts',
],
};
/* eslint-disable @typescript-eslint/no-var-requires */
const jestExpoPreset = require('jest-expo/jest-preset');
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
module.exports = {
...jestExpoPreset,
clearMocks: true,
transform: {
...tsJestPreset.transform,
...jestExpoPreset.transform,
},
testMatch: [
'/packages/**/*.test.ts',
],
modulePathIgnorePatterns: [
'/example',
],
};
/* eslint-disable @typescript-eslint/no-var-requires */
const jestExpoPreset = require('jest-expo/jest-preset');
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
module.exports = {
...jestExpoPreset,
clearMocks: true,
transform: {
...tsJestPreset.transform,
...jestExpoPreset.transform,
},
testMatch: [
'**/*.test.ts',
],
};
/* eslint-disable @typescript-eslint/no-var-requires */
const jestExpoPreset = require('jest-expo/jest-preset');
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
module.exports = {
...jestExpoPreset,
clearMocks: true,
transform: {
...tsJestPreset.transform,
...jestExpoPreset.transform,
},
testMatch: [
'**/*.test.ts',
],
};
jsx: 'react',
},
diagnostics: false,
},
},
modulePathIgnorePatterns: [
'/build/',
'/node_modules/',
'/.history/',
],
moduleNameMapper: {
'\\.svg': '/__mocks__/svgMock.js',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'babel-jest',
},
setupFiles: [
...expoPreset.setupFiles,
...jestPreset.setupFiles,
'/test/jestSetup.ts',
],
/* eslint-disable */
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules-*|sentry-expo|native-base|@dooboo-ui)',
],
/* eslint-enable */
setupFilesAfterEnv: ['./test/setupTest.js'],
};
const jestExpoPreset = require('jest-expo/jest-preset');
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
module.exports = {
...jestExpoPreset,
clearMocks: true,
transform: {
...tsJestPreset.transform,
...jestExpoPreset.transform,
},
testMatch: [
'**/*.test.ts',
],
};
const expoPreset = require('jest-expo/jest-preset')
module.exports = Object.assign(expoPreset, jestPreset, {
setupFiles: [...expoPreset.setupFiles, './setup-tests.js'],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|sentry-expo|native-base)'
],
moduleFileExtensions: ['js', 'ts', 'tsx'],
coverageThreshold: {
global: {
lines: 75
}
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/utils/styled-components.ts',
'!src/utils/suppress-rc-warnings.js',
'!src/utils/mock-schema.ts',
'!src/generated/graphql.tsx',
'!src/aws-exports.js',
const { withWatchPlugins } = require('jest-expo/config');
const { withEnzyme } = require('.');
module.exports = withWatchPlugins({
projects: [
withEnzyme(require('jest-expo/ios/jest-preset')),
withEnzyme(require('jest-expo/android/jest-preset')),
withEnzyme(require('jest-expo/web/jest-preset')),
],
});
const { withWatchPlugins } = require('jest-expo/config');
const createJestPreset = require('./createJestPreset');
module.exports = withWatchPlugins({
projects: [
createJestPreset(require('jest-expo/ios/jest-preset')),
createJestPreset(require('jest-expo/android/jest-preset')),
createJestPreset(require('jest-expo/web/jest-preset')),
createJestPreset(require('jest-expo/node/jest-preset')),
],
});