Commit b4abee1
committed
make .only sticky in watch mode
A second argument can be passed to Api#run(). If true the tests will be run
in exclusive mode, regardless of whether exclusive tests are detected.
The Api now remits the 'stats' event from the forks.
The watcher keeps track of exclusive tests. If all test files that contained
exclusive tests need to be rerun it runs them without forcing exclusive mode.
This means the exclusivity is determined by the tests themselves.
If a test file, containing exclusive tests, is not one of the files being rerun,
it forces exclusive mode. This ensures only exclusive tests are run in the
changed files, making .only sticky.
If all test files that contained exclusive tests are removed, sticky mode is
disabled. The same happens if there are no more exclusive tests after a run.
Fixes #593.1 parent e810ed4 commit b4abee1
4 files changed
+213
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
50 | 65 | | |
51 | 66 | | |
52 | 67 | | |
| |||
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
116 | 149 | | |
117 | 150 | | |
118 | 151 | | |
| |||
153 | 186 | | |
154 | 187 | | |
155 | 188 | | |
156 | | - | |
| 189 | + | |
157 | 190 | | |
158 | 191 | | |
159 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
624 | 639 | | |
625 | 640 | | |
626 | 641 | | |
| |||
666 | 681 | | |
667 | 682 | | |
668 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
669 | 704 | | |
670 | 705 | | |
671 | 706 | | |
| |||
0 commit comments