Skip to content

Commit

Permalink
adding signal for killing zombie process
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham9411 committed Nov 1, 2023
1 parent 9e09409 commit 86d977c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/fixtures/test-runner/timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ const test = require('node:test');
const common = require('../../common');
const fixtures = require('../../common/fixtures');

test('should support timeout', async () => {
const stream = test.run({files: [
fixtures.path('test-runner', 'never_ending_sync.js'),
fixtures.path('test-runner', 'never_ending_async.js'),
] });
test('should support timeout', async ({ signal }) => {
const stream = test.run({
signal,
files: [
fixtures.path('test-runner', 'never_ending_sync.js'),
fixtures.path('test-runner', 'never_ending_async.js'),
]
});
stream.on('test:fail', common.mustCall(2));
stream.on('test:pass', common.mustNotCall());
// eslint-disable-next-line no-unused-vars
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-runner-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const testFixtures = fixtures.path('test-runner');
}

{
// Test --test-timeout flag
const args = [
'--test',
'--test-timeout',
Expand Down

0 comments on commit 86d977c

Please sign in to comment.