| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent be2a5e1 commit fb4180e
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -635,7 +635,7 @@ class Test extends AsyncResource { | |||
| 635 | 635 | this.expectedAssertions = plan; | |
| 636 | 636 | this.cancelled = false; | |
| 637 | 637 | this.skipped = skip !== undefined && skip !== false; | |
| 638 | - this.isTodo = todo !== undefined && todo !== false; | ||
| 638 | + this.isTodo = (todo !== undefined && todo !== false) || this.parent?.isTodo; | ||
| 639 | 639 | this.startTime = null; | |
| 640 | 640 | this.endTime = null; | |
| 641 | 641 | this.passed = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -146,20 +146,20 @@ ok 9 - no | |||
| 146 | 146 | ... | |
| 147 | 147 | # Subtest: no with todo | |
| 148 | 148 | # Subtest: yes | |
| 149 | - ok 1 - yes | ||
| 149 | + ok 1 - yes # TODO | ||
| 150 | 150 | --- | |
| 151 | 151 | duration_ms: * | |
| 152 | 152 | type: 'test' | |
| 153 | 153 | ... | |
| 154 | 154 | # Subtest: maybe | |
| 155 | 155 | # Subtest: yes | |
| 156 | - ok 1 - yes | ||
| 156 | + ok 1 - yes # TODO | ||
| 157 | 157 | --- | |
| 158 | 158 | duration_ms: * | |
| 159 | 159 | type: 'test' | |
| 160 | 160 | ... | |
| 161 | 161 | 1..1 | |
| 162 | - ok 2 - maybe | ||
| 162 | + ok 2 - maybe # TODO | ||
| 163 | 163 | --- | |
| 164 | 164 | duration_ms: * | |
| 165 | 165 | type: 'suite' | |
@@ -193,9 +193,9 @@ ok 11 - DescribeForMatchWithAncestors | |||
| 193 | 193 | 1..11 | |
| 194 | 194 | # tests 18 | |
| 195 | 195 | # suites 12 | |
| 196 | - # pass 16 | ||
| 196 | + # pass 14 | ||
| 197 | 197 | # fail 0 | |
| 198 | 198 | # cancelled 0 | |
| 199 | 199 | # skipped 2 | |
| 200 | - # todo 0 | ||
| 200 | + # todo 2 | ||
| 201 | 201 | # duration_ms * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,3 +13,9 @@ test.todo('should fail without effecting exit code', () => { | |||
| 13 | 13 | test('empty string todo', { todo: '' }, () => { | |
| 14 | 14 | throw new Error('Fail but not badly') | |
| 15 | 15 | }); | |
| 16 | + | ||
| 17 | + describe.todo('should inherit todo', () => { | ||
| 18 | + test('should fail without harming suite', () => { | ||
| 19 | + throw new Error('Fail but not badly'); | ||
| 20 | + }); | ||
| 21 | + }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,10 +58,10 @@ if (process.argv[2] === 'child') { | |||
| 58 | 58 | assert.strictEqual(child.status, 0); | |
| 59 | 59 | assert.strictEqual(child.signal, null); | |
| 60 | 60 | const stdout = child.stdout.toString(); | |
| 61 | - assert.match(stdout, /tests 3/); | ||
| 61 | + assert.match(stdout, /tests 4/); | ||
| 62 | 62 | assert.match(stdout, /pass 0/); | |
| 63 | 63 | assert.match(stdout, /fail 0/); | |
| 64 | - assert.match(stdout, /todo 3/); | ||
| 64 | + assert.match(stdout, /todo 4/); | ||
| 65 | 65 | ||
| 66 | 66 | child = spawnSync(process.execPath, [__filename, 'child', 'fail']); | |
| 67 | 67 | assert.strictEqual(child.status, 1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments