@digest/jest 3.1.17 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/jest.config.js +28 -13
  2. package/package.json +3 -3
@@ -5,6 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
7
  const scripts_1 = __importDefault(require("@digest/scripts"));
8
+ const babel = scripts_1.default.babel && scripts_1.default.jestBabel;
9
+ const emotion = scripts_1.default.emotion && scripts_1.default.jestEmotion;
10
+ const enzyme = scripts_1.default.enzyme && scripts_1.default.jestEnzyme;
11
+ const graphql = scripts_1.default.graphql && scripts_1.default.jestGraphQL;
12
+ const junit = scripts_1.default.jestJUnit;
13
+ const react = scripts_1.default.react && scripts_1.default.jestReact;
14
+ const typescript = scripts_1.default.typescript && scripts_1.default.jestTypeScript;
8
15
  module.exports = {
9
16
  cacheDirectory: path_1.default.join(scripts_1.default.cache, 'jest'),
10
17
  collectCoverageFrom: [
@@ -13,13 +20,13 @@ module.exports = {
13
20
  'packages/**/*.js',
14
21
  '!**/__e2e__/**/*',
15
22
  '!**/__tests__/**/*'
16
- ].concat(scripts_1.default.jestReact ?
23
+ ].concat(react ?
17
24
  [
18
25
  'src/**/*.jsx',
19
26
  'demo/**/*.jsx',
20
27
  'packages/**/*.jsx'
21
28
  ] :
22
- [], scripts_1.default.jestTypeScript ?
29
+ [], typescript ?
23
30
  [
24
31
  'src/**/*.ts',
25
32
  'demo/**/*.ts',
@@ -28,7 +35,7 @@ module.exports = {
28
35
  '!demo/**/*.d.ts',
29
36
  '!packages/**/*.d.ts'
30
37
  ] :
31
- [], scripts_1.default.jestReact && scripts_1.default.jestTypeScript ?
38
+ [], react && typescript ?
32
39
  [
33
40
  'src/**/*.tsx',
34
41
  'demo/**/*.tsx',
@@ -41,7 +48,7 @@ module.exports = {
41
48
  moduleNameMapper: {
42
49
  '\\.(css|scss|sass|less)$': 'identity-obj-proxy'
43
50
  },
44
- reporters: ['default'].concat(scripts_1.default.jestJUnit ?
51
+ reporters: ['default'].concat(junit ?
45
52
  [
46
53
  [
47
54
  'jest-junit',
@@ -60,33 +67,41 @@ module.exports = {
60
67
  rootDir: process.cwd(),
61
68
  setupFiles: [
62
69
  require.resolve(path_1.default.join('@digest', 'jest', 'share', 'setup.js'))
63
- ].concat(scripts_1.default.jestEnzyme ?
70
+ ].concat(enzyme ?
64
71
  [
65
72
  require.resolve(path_1.default.join('@digest', 'jest-enzyme', 'share', 'setup.js'))
66
73
  ] :
67
74
  [], scripts_1.default.jestSetup ?
68
75
  [scripts_1.default.jestSetup] :
69
76
  []),
70
- setupFilesAfterEnv: [].concat(scripts_1.default.jestReact ?
77
+ setupFilesAfterEnv: [].concat(react ?
71
78
  [
72
79
  require.resolve(path_1.default.join('@digest', 'jest-react', 'share', 'env.setup.js'))
73
80
  ] :
74
- [], scripts_1.default.jestEnzyme ?
81
+ [], enzyme ?
75
82
  [
76
83
  require.resolve(path_1.default.join('jest-enzyme', 'lib', 'index.js'))
77
84
  ] :
78
85
  [], scripts_1.default.jestEnvSetup ?
79
86
  [scripts_1.default.jestEnvSetup] :
80
87
  []),
81
- snapshotSerializers: [].concat(scripts_1.default.jestEnzyme ?
88
+ snapshotSerializers: [].concat(enzyme && !emotion ?
82
89
  [
83
90
  require.resolve(path_1.default.join('enzyme-to-json', 'serializer'))
84
91
  ] :
92
+ [], enzyme && emotion ?
93
+ [
94
+ require.resolve(path_1.default.join('@emotion', 'jest', 'enzyme-serializer'))
95
+ ] :
96
+ [], !enzyme && emotion ?
97
+ [
98
+ require.resolve(path_1.default.join('@emotion', 'jest', 'serializer'))
99
+ ] :
85
100
  []),
86
101
  testEnvironment: 'node',
87
102
  testPathIgnorePatterns: ['/\/node_modules\//', '/\/lib\//', '/\/public\//', '/\/static\//', '/\/bin\//', '\.d.ts$'],
88
103
  testRegex: '(__tests__[\\\/\\\\].*|\\.(test|spec))\\.(j|t)sx?$',
89
- transform: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$': 'jest-transform-stub' }, scripts_1.default.jestBabel ?
104
+ transform: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$': 'jest-transform-stub' }, babel ?
90
105
  {
91
106
  '^.+\\.js$': [
92
107
  'babel-jest',
@@ -95,7 +110,7 @@ module.exports = {
95
110
  }
96
111
  ]
97
112
  } :
98
- {}), scripts_1.default.jestBabel && scripts_1.default.jestReact ?
113
+ {}), babel && react ?
99
114
  {
100
115
  '^.+\\.jsx$': [
101
116
  'babel-jest',
@@ -104,7 +119,7 @@ module.exports = {
104
119
  }
105
120
  ]
106
121
  } :
107
- {}), scripts_1.default.jestBabel && scripts_1.default.jestTypeScript ?
122
+ {}), babel && typescript ?
108
123
  {
109
124
  '^.+\\.ts$': [
110
125
  'babel-jest',
@@ -113,7 +128,7 @@ module.exports = {
113
128
  }
114
129
  ]
115
130
  } :
116
- {}), scripts_1.default.jestBabel && scripts_1.default.jestReact && scripts_1.default.jestTypeScript ?
131
+ {}), babel && react && typescript ?
117
132
  {
118
133
  '^.+\\.tsx$': [
119
134
  'babel-jest',
@@ -122,7 +137,7 @@ module.exports = {
122
137
  }
123
138
  ]
124
139
  } :
125
- {}), scripts_1.default.jestBabel && scripts_1.default.jestGraphQL ?
140
+ {}), babel && graphql ?
126
141
  {
127
142
  '^.+\\.(gql|graphql)$': 'jest-transform-graphql'
128
143
  } :
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digest/jest",
3
3
  "title": "Jest Digest",
4
4
  "license": "GPL-3.0",
5
- "version": "3.1.17",
5
+ "version": "3.2.0",
6
6
  "description": "Digested Jest configurations",
7
7
  "author": "wallzero @wallzeroblog (http://wallzero.com)",
8
8
  "contributors": [
@@ -35,7 +35,7 @@
35
35
  "clean": "rimraf node_modules dist package-lock.json npm-debug.log"
36
36
  },
37
37
  "dependencies": {
38
- "@digest/scripts": "^3.1.17",
38
+ "@digest/scripts": "^3.2.0",
39
39
  "jest": "^27.2.4",
40
40
  "jest-transform-stub": "^2.0.0"
41
41
  },
@@ -46,5 +46,5 @@
46
46
  "coverage",
47
47
  "clover"
48
48
  ],
49
- "gitHead": "179968707d0048024b6be670b01bfa30a22aec9a"
49
+ "gitHead": "d8c47081ae9a8f2386786f7964b68092393b6582"
50
50
  }