File tree 3 files changed +28
-18
lines changed
3 files changed +28
-18
lines changed Original file line number Diff line number Diff line change 1
1
const sharedPresets = [ ] ;
2
- const shared = {
3
-
4
- }
2
+ const shared = { } ;
5
3
6
4
module . exports = {
7
5
env : {
8
6
esmUnbundled : shared ,
9
7
esmBundled : {
10
8
...shared ,
11
- presets : [ [ '@babel/env' , {
12
- targets : "> 0.25%, not dead"
13
- } ] , ...sharedPresets ] ,
9
+ presets : [
10
+ [
11
+ '@babel/env' ,
12
+ {
13
+ targets : '> 0.25%, not dead'
14
+ }
15
+ ] ,
16
+ ...sharedPresets
17
+ ]
14
18
} ,
15
19
cjs : {
16
20
...shared ,
17
- presets : [ [ '@babel/env' , {
18
- modules : 'commonjs'
19
- } ] , ...sharedPresets ] ,
21
+ presets : [
22
+ [
23
+ '@babel/env' ,
24
+ {
25
+ modules : 'commonjs'
26
+ }
27
+ ] ,
28
+ ...sharedPresets
29
+ ]
20
30
} ,
21
31
test : {
22
- presets : [ '@babel/env' , ...sharedPresets ]
23
- } ,
32
+ presets : [ [ '@babel/env' , { targets : { node : 'current' } } ] , ...sharedPresets ]
33
+ }
24
34
}
25
- }
35
+ } ;
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ module.exports = {
25
25
26
26
// The directory where Jest should output its coverage files
27
27
coverageDirectory : 'coverage' ,
28
-
29
28
// An array of regexp pattern strings used to skip coverage collection
30
29
// coveragePathIgnorePatterns: [
31
30
// "/node_modules/"
@@ -124,7 +123,7 @@ module.exports = {
124
123
// snapshotSerializers: [],
125
124
126
125
// The test environment that will be used for testing
127
- testEnvironment : 'jsdom'
126
+ testEnvironment : 'jsdom' ,
128
127
129
128
// Options that will be passed to the testEnvironment
130
129
// testEnvironmentOptions: {},
@@ -159,8 +158,9 @@ module.exports = {
159
158
// timers: "real",
160
159
161
160
// A map from regular expressions to paths to transformers
162
- // transform: null,
163
-
161
+ transform : {
162
+ '\\.[jt]sx?$' : 'babel-jest'
163
+ }
164
164
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
165
165
// transformIgnorePatterns: [
166
166
// "/node_modules/"
Original file line number Diff line number Diff line change 17
17
"prebuild" : " yarn run lint" ,
18
18
"prepare" : " husky install" ,
19
19
"dev" : " rollup -c -w --config rollup.dev.js" ,
20
- "test-unit" : " jest" ,
21
- "test-dev" : " jest --watch" ,
20
+ "test-unit" : " BABEL_ENV=test jest" ,
21
+ "test-dev" : " BABEL_ENV=test jest --watch" ,
22
22
"lint" : " yarn run lint-code && yarn run lint-size" ,
23
23
"lint-code" : " yarn eslint src test" ,
24
24
"lint-size" : " yarn size-limit" ,
You can’t perform that action at this time.
0 commit comments