-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_runner: add test location for FileTests
This commit adds the previously missing test location for FileTest tests. Fixes: #49926 Fixes: #49927 PR-URL: #49999 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const fixtures = require('../common/fixtures'); | ||
const { strictEqual } = require('node:assert'); | ||
const { relative } = require('node:path'); | ||
const { run } = require('node:test'); | ||
const fixture = fixtures.path('test-runner', 'never_ending_sync.js'); | ||
const relativePath = relative(process.cwd(), fixture); | ||
const stream = run({ | ||
files: [relativePath], | ||
timeout: common.platformTimeout(100), | ||
}); | ||
|
||
stream.on('test:fail', common.mustCall((result) => { | ||
strictEqual(result.name, relativePath); | ||
strictEqual(result.details.error.failureType, 'testTimeoutFailure'); | ||
strictEqual(result.line, 1); | ||
strictEqual(result.column, 1); | ||
strictEqual(result.file, fixture); | ||
})); |