Skip to content

Commit ebc9bc1

Browse files
committed
✅ cli.test.js: Adds test for --headless behaviour
Closes #37
1 parent 8cef815 commit ebc9bc1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/cli.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ test.serial('Saves to temporary system folder when --copy is present', async t =
7878
t.false(await fileExists(DUMMY_FILE_NAME));
7979
});
8080

81+
test.serial('Downloads correctly with --headless / makes sure Carbon’s selector is still the same', async t => {
82+
await execa(SCRIPT, [
83+
DUMMY_FROM,
84+
`--headless`,
85+
`-t=${DUMMY_TARGET_NAME}`
86+
]);
87+
88+
t.true(await fileExists(DUMMY_FILE_NAME));
89+
});
90+
8191
// Cleanup
8292
test.afterEach((async () => {
8393
await del([

0 commit comments

Comments
 (0)