@@ -40,7 +40,7 @@ const toPaths = (tests: Array<Test>) => tests.map(({path}) => path);
40
40
let findMatchingTests : ( config : Config . ProjectConfig ) => Promise < SearchResult > ;
41
41
42
42
describe ( 'SearchSource' , ( ) => {
43
- const name = 'SearchSource' ;
43
+ const id = 'SearchSource' ;
44
44
let searchSource : SearchSource ;
45
45
46
46
describe ( 'isTestFilePath' , ( ) => {
@@ -50,7 +50,7 @@ describe('SearchSource', () => {
50
50
config = (
51
51
await normalize (
52
52
{
53
- name ,
53
+ id ,
54
54
rootDir : '.' ,
55
55
roots : [ ] ,
56
56
} ,
@@ -71,7 +71,7 @@ describe('SearchSource', () => {
71
71
config = (
72
72
await normalize (
73
73
{
74
- name ,
74
+ id ,
75
75
rootDir : '.' ,
76
76
roots : [ ] ,
77
77
testMatch : undefined ,
@@ -121,8 +121,8 @@ describe('SearchSource', () => {
121
121
it ( 'finds tests matching a pattern via testRegex' , async ( ) => {
122
122
const { options : config } = await normalize (
123
123
{
124
+ id,
124
125
moduleFileExtensions : [ 'js' , 'jsx' , 'txt' ] ,
125
- name,
126
126
rootDir,
127
127
testMatch : undefined ,
128
128
testRegex : 'not-really-a-test' ,
@@ -145,8 +145,8 @@ describe('SearchSource', () => {
145
145
it ( 'finds tests matching a pattern via testMatch' , async ( ) => {
146
146
const { options : config } = await normalize (
147
147
{
148
+ id,
148
149
moduleFileExtensions : [ 'js' , 'jsx' , 'txt' ] ,
149
- name,
150
150
rootDir,
151
151
testMatch : [ '**/not-really-a-test.txt' , '!**/do-not-match-me.txt' ] ,
152
152
testRegex : '' ,
@@ -169,8 +169,8 @@ describe('SearchSource', () => {
169
169
it ( 'finds tests matching a JS regex pattern' , async ( ) => {
170
170
const { options : config } = await normalize (
171
171
{
172
+ id,
172
173
moduleFileExtensions : [ 'js' , 'jsx' ] ,
173
- name,
174
174
rootDir,
175
175
testMatch : undefined ,
176
176
testRegex : 'test.jsx?' ,
@@ -191,8 +191,8 @@ describe('SearchSource', () => {
191
191
it ( 'finds tests matching a JS glob pattern' , async ( ) => {
192
192
const { options : config } = await normalize (
193
193
{
194
+ id,
194
195
moduleFileExtensions : [ 'js' , 'jsx' ] ,
195
- name,
196
196
rootDir,
197
197
testMatch : [ '**/test.js?(x)' ] ,
198
198
testRegex : '' ,
@@ -213,8 +213,8 @@ describe('SearchSource', () => {
213
213
it ( 'finds tests matching a JS with overriding glob patterns' , async ( ) => {
214
214
const { options : config } = await normalize (
215
215
{
216
+ id,
216
217
moduleFileExtensions : [ 'js' , 'jsx' ] ,
217
- name,
218
218
rootDir,
219
219
testMatch : [
220
220
'**/*.js?(x)' ,
@@ -241,7 +241,7 @@ describe('SearchSource', () => {
241
241
it ( 'finds tests with default file extensions using testRegex' , async ( ) => {
242
242
const { options : config } = await normalize (
243
243
{
244
- name ,
244
+ id ,
245
245
rootDir,
246
246
testMatch : undefined ,
247
247
testRegex,
@@ -262,7 +262,7 @@ describe('SearchSource', () => {
262
262
it ( 'finds tests with default file extensions using testMatch' , async ( ) => {
263
263
const { options : config } = await normalize (
264
264
{
265
- name ,
265
+ id ,
266
266
rootDir,
267
267
testMatch,
268
268
testRegex : '' ,
@@ -283,7 +283,7 @@ describe('SearchSource', () => {
283
283
it ( 'finds tests with parentheses in their rootDir when using testMatch' , async ( ) => {
284
284
const { options : config } = await normalize (
285
285
{
286
- name ,
286
+ id ,
287
287
rootDir : path . resolve ( __dirname , 'test_root_with_(parentheses)' ) ,
288
288
testMatch : [ '<rootDir>**/__testtests__/**/*' ] ,
289
289
testRegex : undefined ,
@@ -303,8 +303,8 @@ describe('SearchSource', () => {
303
303
it ( 'finds tests with similar but custom file extensions' , async ( ) => {
304
304
const { options : config } = await normalize (
305
305
{
306
+ id,
306
307
moduleFileExtensions : [ 'js' , 'jsx' ] ,
307
- name,
308
308
rootDir,
309
309
testMatch,
310
310
} ,
@@ -324,8 +324,8 @@ describe('SearchSource', () => {
324
324
it ( 'finds tests with totally custom foobar file extensions' , async ( ) => {
325
325
const { options : config } = await normalize (
326
326
{
327
+ id,
327
328
moduleFileExtensions : [ 'js' , 'foobar' ] ,
328
- name,
329
329
rootDir,
330
330
testMatch,
331
331
} ,
@@ -345,8 +345,8 @@ describe('SearchSource', () => {
345
345
it ( 'finds tests with many kinds of file extensions' , async ( ) => {
346
346
const { options : config } = await normalize (
347
347
{
348
+ id,
348
349
moduleFileExtensions : [ 'js' , 'jsx' ] ,
349
- name,
350
350
rootDir,
351
351
testMatch,
352
352
} ,
@@ -366,7 +366,7 @@ describe('SearchSource', () => {
366
366
it ( 'finds tests using a regex only' , async ( ) => {
367
367
const { options : config } = await normalize (
368
368
{
369
- name ,
369
+ id ,
370
370
rootDir,
371
371
testMatch : undefined ,
372
372
testRegex,
@@ -387,7 +387,7 @@ describe('SearchSource', () => {
387
387
it ( 'finds tests using a glob only' , async ( ) => {
388
388
const { options : config } = await normalize (
389
389
{
390
- name ,
390
+ id ,
391
391
rootDir,
392
392
testMatch,
393
393
testRegex : '' ,
@@ -411,7 +411,7 @@ describe('SearchSource', () => {
411
411
const config = (
412
412
await normalize (
413
413
{
414
- name ,
414
+ id ,
415
415
rootDir : '.' ,
416
416
roots : [ ] ,
417
417
} ,
@@ -509,7 +509,7 @@ describe('SearchSource', () => {
509
509
'haste_impl.js' ,
510
510
) ,
511
511
} ,
512
- name : 'SearchSource-findRelatedTests-tests' ,
512
+ id : 'SearchSource-findRelatedTests-tests' ,
513
513
rootDir,
514
514
} ,
515
515
{ } as Config . Argv ,
@@ -564,8 +564,8 @@ describe('SearchSource', () => {
564
564
beforeEach ( async ( ) => {
565
565
const { options : config } = await normalize (
566
566
{
567
+ id,
567
568
moduleFileExtensions : [ 'js' , 'jsx' , 'foobar' ] ,
568
- name,
569
569
rootDir,
570
570
testMatch,
571
571
} ,
@@ -623,7 +623,7 @@ describe('SearchSource', () => {
623
623
const config = (
624
624
await normalize (
625
625
{
626
- name ,
626
+ id ,
627
627
rootDir : '.' ,
628
628
roots : [ '/foo/bar/prefix' ] ,
629
629
} ,
@@ -657,7 +657,7 @@ describe('SearchSource', () => {
657
657
'../../../jest-haste-map/src/__tests__/haste_impl.js' ,
658
658
) ,
659
659
} ,
660
- name : 'SearchSource-findRelatedSourcesFromTestsInChangedFiles-tests' ,
660
+ id : 'SearchSource-findRelatedSourcesFromTestsInChangedFiles-tests' ,
661
661
rootDir,
662
662
} ,
663
663
{ } as Config . Argv ,
0 commit comments