[READ-ONLY] Mirror of https://github.com/bombshell-dev/args. <1kB CLI flag parser
args args-parser cli command-line command-line-parser node
5

Configure Feed

Select the types of activity you want to include in your feed.

add test

Nate Moore (Feb 6, 2023, 6:23 AM -0600) 581f12fb c4e5a2af

+20 -1
+20 -1
test/flags.test.ts
··· 195 195 help: true 196 196 }; 197 197 const result = parse(input, { alias: { h: 'help' }}); 198 - console.log(result) 199 198 expect(result).toEqual(output); 200 199 }); 201 200 ··· 225 224 expect(parse(input, opts)).toEqual(output); 226 225 }); 227 226 }); 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 + });