Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit d11db67

Browse files
authored
Merge pull request #6 from mnightingale/feature/cachestrategy
Replace permanent with immutable and mutable cache strategies
2 parents 9e88b17 + 78aea73 commit d11db67

12 files changed

+927
-668
lines changed

jest.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const { defaults: tsjPreset } = require('ts-jest/presets')
2+
3+
module.exports = {
4+
...tsjPreset,
5+
preset: 'react-native',
6+
transform: {
7+
...tsjPreset.transform,
8+
'\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
9+
},
10+
snapshotSerializers: ['enzyme-to-json/serializer'],
11+
setupFiles: ['<rootDir>/tests/config.tsx'],
12+
globals: {
13+
'ts-jest': {
14+
babelConfig: true,
15+
},
16+
},
17+
}

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "dv-scripts build",
3636
"lint": "dv-scripts lint src tests",
3737
"release": "dv-scripts release",
38-
"test": "dv-scripts test"
38+
"test": "yarn jest"
3939
},
4040
"prettier": {
4141
"printWidth": 100,
@@ -46,12 +46,6 @@
4646
"eslintConfig": {
4747
"extends": "dv-scripts"
4848
},
49-
"jest": {
50-
"preset": "react-native",
51-
"setupFiles": [
52-
"./tests/config.tsx"
53-
]
54-
},
5549
"dependencies": {
5650
"buffer": "^5.0.8",
5751
"crypto-js": "^3.1.9-1",
@@ -67,6 +61,7 @@
6761
"@babel/core": "^7.11.6",
6862
"@babel/runtime": "^7.11.2",
6963
"@types/crypto-js": "^3.1.47",
64+
"@types/enzyme-adapter-react-16": "^1.0.6",
7065
"@types/jest": "^26.0.13",
7166
"@types/react": "^16.9.49",
7267
"@types/react-native": "^0.63.18",
@@ -83,6 +78,7 @@
8378
"dv-scripts": "^1.4.2",
8479
"enzyme": "^3.11.0",
8580
"enzyme-adapter-react-16": "^1.15.4",
81+
"enzyme-to-json": "^3.5.0",
8682
"eslint-config-dv-scripts": "^1.1.1",
8783
"jest": "^26.4.2",
8884
"metro-react-native-babel-preset": "^0.63.0",
@@ -93,6 +89,7 @@
9389
"should": "^13.1.2",
9490
"should-sinon": "^0.0.6",
9591
"sinon": "^4.1.3",
92+
"ts-jest": "^26.4.0",
9693
"typescript": "^4.0.2"
9794
},
9895
"peerDependencies": {

0 commit comments

Comments
 (0)