File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,21 @@ test("when which found our program", async (t) => {
5
5
let where = await whereis('ls');
6
6
t.equal(where, '/bin/ls', 'ls was found');
7
7
});
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
+ });
You can’t perform that action at this time.
0 commit comments