Skip to content

Commit 581f12f

Browse files
committed
add test
1 parent c4e5a2a commit 581f12f

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/flags.test.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ describe("aliases", () => {
195195
help: true
196196
};
197197
const result = parse(input, { alias: { h: 'help' }});
198-
console.log(result)
199198
expect(result).toEqual(output);
200199
});
201200

@@ -225,3 +224,23 @@ describe("aliases", () => {
225224
expect(parse(input, opts)).toEqual(output);
226225
});
227226
});
227+
228+
describe("special cases", () => {
229+
it("just a hyphen", () => {
230+
const input = ["-"];
231+
const output = {
232+
_: ['-'],
233+
};
234+
const result = parse(input);
235+
expect(result).toEqual(output);
236+
});
237+
238+
it("just a hyphen", () => {
239+
const input = ["-"];
240+
const output = {
241+
_: ['-'],
242+
};
243+
const result = parse(input);
244+
expect(result).toEqual(output);
245+
});
246+
});

0 commit comments

Comments
 (0)