diff options
Diffstat (limited to 'flags/tests/dash.ts')
| -rwxr-xr-x | flags/tests/dash.ts | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/flags/tests/dash.ts b/flags/tests/dash.ts index 13fa153cb..f70108124 100755 --- a/flags/tests/dash.ts +++ b/flags/tests/dash.ts @@ -1,26 +1,29 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { test } from "../../testing/mod.ts"; -import { assertEq } from "../../testing/asserts.ts"; +import { assertEquals } from "../../testing/asserts.ts"; import { parse } from "../mod.ts"; test(function hyphen() { - assertEq(parse(["-n", "-"]), { n: "-", _: [] }); - assertEq(parse(["-"]), { _: ["-"] }); - assertEq(parse(["-f-"]), { f: "-", _: [] }); - assertEq(parse(["-b", "-"], { boolean: "b" }), { b: true, _: ["-"] }); - assertEq(parse(["-s", "-"], { string: "s" }), { s: "-", _: [] }); + assertEquals(parse(["-n", "-"]), { n: "-", _: [] }); + assertEquals(parse(["-"]), { _: ["-"] }); + assertEquals(parse(["-f-"]), { f: "-", _: [] }); + assertEquals(parse(["-b", "-"], { boolean: "b" }), { b: true, _: ["-"] }); + assertEquals(parse(["-s", "-"], { string: "s" }), { s: "-", _: [] }); }); test(function doubleDash() { - assertEq(parse(["-a", "--", "b"]), { a: true, _: ["b"] }); - assertEq(parse(["--a", "--", "b"]), { a: true, _: ["b"] }); - assertEq(parse(["--a", "--", "b"]), { a: true, _: ["b"] }); + assertEquals(parse(["-a", "--", "b"]), { a: true, _: ["b"] }); + assertEquals(parse(["--a", "--", "b"]), { a: true, _: ["b"] }); + assertEquals(parse(["--a", "--", "b"]), { a: true, _: ["b"] }); }); test(function moveArgsAfterDoubleDashIntoOwnArray() { - assertEq(parse(["--name", "John", "before", "--", "after"], { "--": true }), { - name: "John", - _: ["before"], - "--": ["after"] - }); + assertEquals( + parse(["--name", "John", "before", "--", "after"], { "--": true }), + { + name: "John", + _: ["before"], + "--": ["after"] + } + ); }); |
