forked from oracle/graaljs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_runner: fix typescript coverage
PR-URL: nodejs/node#49406 Fixes: nodejs/node#49398 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
- Loading branch information
Showing
5 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
graal-nodejs/test/fixtures/test-runner/output/coverage_failure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Flags: --expose-internals --experimental-test-coverage | ||
|
||
'use strict'; | ||
require('../../../common'); | ||
const { TestCoverage } = require('internal/test_runner/coverage'); | ||
const { test, mock } = require('node:test'); | ||
|
||
mock.method(TestCoverage.prototype, 'summary', () => { | ||
throw new Error('Failed to collect coverage'); | ||
}); | ||
|
||
test('ok'); | ||
|
16 changes: 16 additions & 0 deletions
16
graal-nodejs/test/fixtures/test-runner/output/coverage_failure.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
TAP version 13 | ||
# Subtest: ok | ||
ok 1 - ok | ||
--- | ||
duration_ms: * | ||
... | ||
1..1 | ||
# Warning: Could not report code coverage. Error: Failed to collect coverage | ||
# tests 1 | ||
# suites 0 | ||
# pass 1 | ||
# fail 0 | ||
# cancelled 0 | ||
# skipped 0 | ||
# todo 0 | ||
# duration_ms * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters