Skip to content
Permalink
Browse files

chore(payments): further testing tweaks

- switch frontend back to react-scripts for create-react-app consistency
- separate jest config for server tests

issue mozilla#2102
  • Loading branch information...
lmorchard committed Aug 12, 2019
1 parent d42a9e8 commit f2fd2d6a472a616408e0345aca4f3177532b97c8
@@ -0,0 +1,21 @@
module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.stories.*',
'!**/types.tsx',
'!**/*.d.ts',
'!**/jest*js',
],
coverageThreshold: {
global: {
branches: 63,
functions: 52,
lines: 69,
statements: 69,
},
},
};
@@ -12,8 +12,9 @@
"build-start-dev": "npm run build && npm run start-dev",
"build": "react-scripts build",
"eject": "react-scripts eject",
"test": "jest --coverage --verbose",
"test:watch": "jest --coverage --watchAll",
"test": "npm-run-all test:*",
"test:frontend": "react-scripts test --coverage --verbose",
"test:server": "jest --coverage --verbose --config server/jest.config.js",
"format": "prettier '**' --write",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
@@ -127,27 +128,6 @@
"npm": ">=6.4.1"
},
"readmeFilename": "README.md",
"jest": {
"projects": [
"src/jest.config.js",
"server/jest.config.js"
],
"collectCoverageFrom": [
"**/*.{js,jsx,ts,tsx}",
"!**/*.stories.*",
"!**/types.tsx",
"!**/*.d.ts",
"!**/jest*js"
],
"coverageThreshold": {
"global": {
"branches": 63,
"functions": 52,
"lines": 69,
"statements": 69
}
}
},
"browserslist": {
"production": [
">0.2%",
@@ -1,7 +1,13 @@
// TO DO: update this file once more server tests are in place
module.exports = {
displayName: 'server',
// TO DO: ignore server coverage for now - remove this if / when we want
// server files included in coverage reports
coveragePathIgnorePatterns: ['<rootDir>'],
collectCoverageFrom: ['**/*.js', '!**/jest*js'],
// TO DO: update this file once more server tests are in place
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
};
@@ -0,0 +1,3 @@
it('works', () => {
expect(true).toEqual(true);
});
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
@@ -13,7 +17,9 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
"jsx": "preserve"
},
"include": ["src"]
"include": [
"src"
]
}

0 comments on commit f2fd2d6

Please sign in to comment.
You can’t perform that action at this time.