Skip to content

Commit d6d2d9d

Browse files
committed
test: Update test case.
1 parent 95328b4 commit d6d2d9d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,21 @@ test("when which found our program", async (t) => {
55
let where = await whereis('ls');
66
t.equal(where, '/bin/ls', 'ls was found');
77
});
8+
9+
test("undefined", async (t) => {
10+
try {
11+
await whereis();
12+
} catch (error) {
13+
t.equal(error, 'Could not find undefined on your system; Command failed: which undefined\n', 'undefined was found');
14+
t.equal(error.message, undefined, 'undefined was found');
15+
}
16+
});
17+
18+
test("Empty", async (t) => {
19+
try {
20+
await whereis('');
21+
} catch (error) {
22+
t.equal(error, 'Could not find on your system; Command failed: which \nusage: which [-as] program ...\n', 'Empty was found');
23+
t.equal(error.message, undefined, 'Empty was found');
24+
}
25+
});

0 commit comments

Comments
 (0)