xref: /third_party/node/test/parallel/test-runner-filetest-location.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures');
41cb0ef41Sopenharmony_ciconst { strictEqual } = require('node:assert');
51cb0ef41Sopenharmony_ciconst { relative } = require('node:path');
61cb0ef41Sopenharmony_ciconst { run } = require('node:test');
71cb0ef41Sopenharmony_ciconst fixture = fixtures.path('test-runner', 'never_ending_sync.js');
81cb0ef41Sopenharmony_ciconst relativePath = relative(process.cwd(), fixture);
91cb0ef41Sopenharmony_ciconst stream = run({
101cb0ef41Sopenharmony_ci  files: [relativePath],
111cb0ef41Sopenharmony_ci  timeout: common.platformTimeout(100),
121cb0ef41Sopenharmony_ci});
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_cistream.on('test:fail', common.mustCall((result) => {
151cb0ef41Sopenharmony_ci  strictEqual(result.name, relativePath);
161cb0ef41Sopenharmony_ci  strictEqual(result.details.error.failureType, 'testTimeoutFailure');
171cb0ef41Sopenharmony_ci  strictEqual(result.line, 1);
181cb0ef41Sopenharmony_ci  strictEqual(result.column, 1);
191cb0ef41Sopenharmony_ci  strictEqual(result.file, fixture);
201cb0ef41Sopenharmony_ci}));
21

Indexes created Thu Nov 07 10:32:03 CST 2024