Commit 8437db0
committed
test_runner: match dotfiles in default coverage exclude
The default coverage exclude globs did not match dotfiles, so test
files such as `test/.foo.test.js` were incorrectly included in coverage
reports. Apply the `dot: true` minimatch option when matching the
relative path so the default exclude patterns cover dotfiles, while
keeping plain matching for the absolute path to avoid misinterpreting
dot segments in the filesystem path (e.g. tmp dirs like `test/.tmp.0`).
Fixes: #63397
Signed-off-by: semimikoh <ejffjeosms@gmail.com>1 parent 0032189 commit 8437db0
3 files changed
Lines changed: 59 additions & 31 deletions
File tree
- lib/internal/test_runner
- test
- fixtures/test-runner/coverage-default-exclusion/test
- parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
557 | 568 | | |
558 | 569 | | |
559 | 570 | | |
560 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
561 | 575 | | |
562 | | - | |
| 576 | + | |
563 | 577 | | |
564 | | - | |
| 578 | + | |
565 | 579 | | |
566 | 580 | | |
567 | 581 | | |
568 | 582 | | |
569 | | - | |
| 583 | + | |
| 584 | + | |
570 | 585 | | |
571 | 586 | | |
572 | 587 | | |
573 | 588 | | |
574 | 589 | | |
575 | 590 | | |
576 | | - | |
| 591 | + | |
| 592 | + | |
577 | 593 | | |
578 | 594 | | |
579 | 595 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 31 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
| 83 | + | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 88 | | |
103 | 89 | | |
104 | 90 | | |
| |||
111 | 97 | | |
112 | 98 | | |
113 | 99 | | |
114 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
0 commit comments