@@ -60,6 +60,17 @@ test('should parse boolean flag', async () => {
|
60 | 60 | strictEqual(result.code, 0); |
61 | 61 | }); |
62 | 62 | |
| 63 | +test('should parse boolean flag defaulted to true', async () => { |
| 64 | +const result = await spawnPromisified(process.execPath, [ |
| 65 | +'--experimental-config-file', |
| 66 | +fixtures.path('rc/warnings-false.json'), |
| 67 | +'-p', 'process.emitWarning("A warning")', |
| 68 | +]); |
| 69 | +strictEqual(result.stderr, ''); |
| 70 | +strictEqual(result.stdout, 'undefined\n'); |
| 71 | +strictEqual(result.code, 0); |
| 72 | +}); |
| 73 | + |
63 | 74 | test('should throw an error when a flag is declared twice', async () => { |
64 | 75 | const result = await spawnPromisified(process.execPath, [ |
65 | 76 | '--no-warnings', |
|