Skip to content

Commit 23dd771

Browse files
committed
test: add missing test for env file
1 parent 668e523 commit 23dd771

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/parallel/test-dotenv-edge-cases.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,16 @@ describe('.env supports edge cases', () => {
148148
assert.strictEqual(child.stderr, '');
149149
assert.strictEqual(child.code, 0);
150150
});
151+
152+
it('should reject invalid env file flag', async () => {
153+
const child = await common.spawnPromisified(
154+
process.execPath,
155+
['--env-file-ABCD', validEnvFilePath],
156+
{ cwd: __dirname },
157+
);
158+
159+
assert.strictEqual(child.stdout, '');
160+
assert.strictEqual(child.code, 9);
161+
assert.match(child.stderr, /bad option: --env-file-ABCD/);
162+
});
151163
});

0 commit comments

Comments
 (0)