fix(testing): fix generated testMatch pattern in jest config to support windows (#15415)
This commit is contained in:
parent
95c832ae91
commit
5e12d053a9
@ -22,6 +22,6 @@
|
|||||||
]<% } %><% if(rootProject){ %>,
|
]<% } %><% if(rootProject){ %>,
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
||||||
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
|
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
|
||||||
],<% } %>
|
],<% } %>
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
coverageDirectory: '<%= offsetFromRoot %>coverage/<%= projectRoot %>'<% if(rootProject){ %>,
|
coverageDirectory: '<%= offsetFromRoot %>coverage/<%= projectRoot %>'<% if(rootProject){ %>,
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
||||||
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
|
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
|
||||||
],<% } %>
|
],<% } %>
|
||||||
};
|
};
|
||||||
|
|||||||
@ -388,7 +388,7 @@ describe('jestProject', () => {
|
|||||||
coverageDirectory: './coverage/my-project',
|
coverageDirectory: './coverage/my-project',
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
||||||
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
|
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
"
|
"
|
||||||
@ -421,7 +421,7 @@ describe('jestProject', () => {
|
|||||||
coverageDirectory: './coverage/my-project',
|
coverageDirectory: './coverage/my-project',
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
|
||||||
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
|
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
"
|
"
|
||||||
|
|||||||
@ -281,7 +281,7 @@ function getJestOptions(
|
|||||||
delete jestOptions['testRegex'];
|
delete jestOptions['testRegex'];
|
||||||
jestOptions['testMatch'] = isE2E
|
jestOptions['testMatch'] = isE2E
|
||||||
? ['<rootDir>/test/**/?(*.)+(e2e-spec|e2e-test).[jt]s?(x)']
|
? ['<rootDir>/test/**/?(*.)+(e2e-spec|e2e-test).[jt]s?(x)']
|
||||||
: ['<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)'];
|
: ['<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)'];
|
||||||
|
|
||||||
// set coverage directory for unit test
|
// set coverage directory for unit test
|
||||||
if (!isE2E) {
|
if (!isE2E) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user