Skip to content

Commit e39f509

Browse files
author
bojavou
committed
Test threadArgumentsFilter ignored for process
1 parent 94be613 commit e39f509

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import test from 'ava';
2+
3+
test('exec arguments unfiltered', t => {
4+
t.plan(2);
5+
t.truthy(process.execArgv.includes('--throw-deprecation'));
6+
t.truthy(process.execArgv.includes('--allow-natives-syntax'));
7+
});

test/node-arguments/snapshots/test.js.md

+11
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ Generated by [AVA](https://avajs.dev).
2626
},
2727
]
2828

29+
## `threadArgumentsFilter` configuration ignored for worker process
30+
31+
> tests pass
32+
33+
[
34+
{
35+
file: 'process.js',
36+
title: 'exec arguments unfiltered',
37+
},
38+
]
39+
2940
## detects incomplete --node-arguments
3041

3142
> fails with message
40 Bytes
Binary file not shown.

test/node-arguments/test.js

+10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ test('`threadArgumentsFilter` configuration filters arguments for worker thread'
2323
t.snapshot(result.stats.passed, 'tests pass');
2424
});
2525

26+
test('`threadArgumentsFilter` configuration ignored for worker process', async t => {
27+
const options = {
28+
cwd: cwd('thread-arguments-filter'),
29+
};
30+
31+
const result = await fixture(['--config=thread-arguments-filter.config.mjs', '--no-worker-threads', 'process.js'], options);
32+
33+
t.snapshot(result.stats.passed, 'tests pass');
34+
});
35+
2636
test('detects incomplete --node-arguments', async t => {
2737
const options = {
2838
cwd: cwd('node-arguments'),

0 commit comments

Comments
 (0)