Buckets:
ktongue/docker_container / .cache /opencode /node_modules /process-warning /test /no-warnings.test.js
| const { test } = require('node:test') | |
| const { spawnSync } = require('node:child_process') | |
| const { resolve } = require('node:path') | |
| const entry = resolve(__dirname, '../examples', 'example.js') | |
| test('--no-warnings is set in cli', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| '--no-warnings', | |
| entry | |
| ]) | |
| const stderr = child.stderr.toString() | |
| t.assert.deepStrictEqual(stderr, '') | |
| }) | |
| test('--no-warnings is not set in cli', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| entry | |
| ]) | |
| const stderr = child.stderr.toString() | |
| t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) | |
| }) | |
| test('NODE_NO_WARNINGS is set to 1', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| entry | |
| ], { | |
| env: { | |
| NODE_NO_WARNINGS: '1' | |
| } | |
| }) | |
| const stderr = child.stderr.toString() | |
| t.assert.deepStrictEqual(stderr, '') | |
| }) | |
| test('NODE_NO_WARNINGS is set to 0', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| entry | |
| ], { | |
| env: { | |
| NODE_NO_WARNINGS: '0' | |
| } | |
| }) | |
| const stderr = child.stderr.toString() | |
| t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) | |
| }) | |
| test('NODE_NO_WARNINGS is not set', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| entry | |
| ]) | |
| const stderr = child.stderr.toString() | |
| t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/) | |
| }) | |
| test('NODE_Options contains --no-warnings', t => { | |
| t.plan(1) | |
| const child = spawnSync(process.execPath, [ | |
| entry | |
| ], { | |
| env: { | |
| NODE_OPTIONS: '--no-warnings' | |
| } | |
| }) | |
| const stderr = child.stderr.toString() | |
| t.assert.deepStrictEqual(stderr, '') | |
| }) | |
Xet Storage Details
- Size:
- 1.78 kB
- Xet hash:
- 16188b435d68683c3467818ee05025f1e513678c10f0ea4143e10d4a50d3a65e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.