File tree Expand file tree Collapse file tree 9 files changed +55
-37
lines changed Expand file tree Collapse file tree 9 files changed +55
-37
lines changed Original file line number Diff line number Diff line change 1
- const {
2
- default : umiConfig ,
3
- } = require ( '@umijs/test/lib/createDefaultConfig/createDefaultConfig' ) ;
1
+ import { createConfig , Config } from '@umijs/test' ;
2
+ import path from 'path' ;
4
3
5
- const path = require ( 'path' ) ;
6
- const defaultConfig = umiConfig ( process . cwd ( ) , { } ) ;
4
+ const base : Config . InitialOptions = createConfig ( {
5
+ jsTransformer : 'esbuild' ,
6
+ target : 'node' ,
7
+ } ) ;
7
8
8
- module . exports = {
9
- ...defaultConfig ,
10
- testEnvironment : 'node' ,
11
- verbose : true ,
9
+ const config : Config . InitialOptions = {
10
+ ...base ,
12
11
moduleNameMapper : {
12
+ ...base . moduleNameMapper ,
13
13
'commitlint-plugin-gitmoji' : '<rootDir>/packages/commitlint-plugin/src' ,
14
14
'@gitmoji/parser-opts' : '<rootDir>/packages/parser-opts/src' ,
15
15
'@gitmoji/commit-types' : '<rootDir>/packages/commit-types/src' ,
16
16
} ,
17
17
rootDir : path . resolve ( __dirname , '.' ) ,
18
18
} ;
19
+
20
+ export default config ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import baseConfig from './jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
3
+
4
+ const config : Config . InitialOptions = {
5
+ ...baseConfig ,
6
+ projects : [ '<rootDir>/packages/*/jest.config.ts' ] ,
7
+ collectCoverageFrom : [
8
+ '<rootDir>/packages/*/src/**/*.ts' ,
9
+ '<rootDir>/packages/*/src/**/*.tsx' ,
10
+ ] ,
11
+ coverageDirectory : '<rootDir>/coverage/' ,
12
+ } ;
13
+
14
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = '@gitmoji/conventional-changelog-gitmoji-config' ;
4
5
5
6
const root = '<rootDir>/packages/changelog' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
13
} ;
14
+
15
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = '@gitmoji/commit-types' ;
4
5
5
6
const root = '<rootDir>/packages/commit-types' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
13
} ;
14
+
15
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = 'commitlint-config-gitmoji' ;
4
5
5
6
const root = '<rootDir>/packages/commitlint-config' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
13
} ;
14
+
15
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = 'commitlint-plugin-gitmoji' ;
4
5
5
6
const root = '<rootDir>/packages/commitlint-plugin' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
- collectCoverageFrom : [ `${ root } /src/**/*.ts` ] ,
14
13
} ;
14
+
15
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = '@gitmoji/parser-opts' ;
4
5
5
6
const root = '<rootDir>/packages/parser-opts' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
13
} ;
14
+
15
+ export default config ;
Original file line number Diff line number Diff line change 1
- const base = require ( '../../jest.config.base' ) ;
1
+ import base from '../../jest.config.base' ;
2
+ import { Config } from '@umijs/test' ;
2
3
3
4
const packageName = 'semantic-release-config-gitmoji' ;
4
5
5
6
const root = '<rootDir>/packages/release-config' ;
6
7
7
- module . exports = {
8
+ const config : Config . InitialOptions = {
8
9
...base ,
9
10
rootDir : '../..' ,
10
11
roots : [ root ] ,
11
- name : packageName ,
12
12
displayName : packageName ,
13
13
} ;
14
+
15
+ export default config ;
You can’t perform that action at this time.
0 commit comments