diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 19:42:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-06 19:42:24 -0500 |
| commit | caa383a5835c167bf6657120ad3c1c5009670785 (patch) | |
| tree | 2f350928e23e472278b9c3ebd798f13169b6d581 /flags/tests/bool.ts | |
| parent | e36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (diff) | |
Rename assertEq to assertEquals (denoland/deno_std#242)
After some discussion it was found that assertEquals is more common
in JS (vs assertEqual, assertEq) and sounds better in the negated form:
assertNotEquals vs assertNE.
Original: https://github.com/denoland/deno_std/commit/4cf39d4a1420b8153cd78d03d03ef843607ae506
Diffstat (limited to 'flags/tests/bool.ts')
| -rwxr-xr-x | flags/tests/bool.ts | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/flags/tests/bool.ts b/flags/tests/bool.ts index 1146698fa..321dbb1e9 100755 --- a/flags/tests/bool.ts +++ b/flags/tests/bool.ts @@ -1,6 +1,6 @@ // 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 flagBooleanDefaultFalse() { @@ -9,14 +9,14 @@ test(function flagBooleanDefaultFalse() { default: { verbose: false, t: false } }); - assertEq(argv, { + assertEquals(argv, { verbose: false, t: false, _: ["moo"] }); - assertEq(typeof argv.verbose, "boolean"); - assertEq(typeof argv.t, "boolean"); + assertEquals(typeof argv.verbose, "boolean"); + assertEquals(typeof argv.t, "boolean"); }); test(function booleanGroups() { @@ -24,16 +24,16 @@ test(function booleanGroups() { boolean: ["x", "y", "z"] }); - assertEq(argv, { + assertEquals(argv, { x: true, y: false, z: true, _: ["one", "two", "three"] }); - assertEq(typeof argv.x, "boolean"); - assertEq(typeof argv.y, "boolean"); - assertEq(typeof argv.z, "boolean"); + assertEquals(typeof argv.x, "boolean"); + assertEquals(typeof argv.y, "boolean"); + assertEquals(typeof argv.z, "boolean"); }); test(function booleanAndAliasWithChainableApi() { @@ -56,8 +56,8 @@ test(function booleanAndAliasWithChainableApi() { _: ["derp"] }; - assertEq(aliasedArgv, expected); - assertEq(propertyArgv, expected); + assertEquals(aliasedArgv, expected); + assertEquals(propertyArgv, expected); }); test(function booleanAndAliasWithOptionsHash() { @@ -74,8 +74,8 @@ test(function booleanAndAliasWithOptionsHash() { h: true, _: ["derp"] }; - assertEq(aliasedArgv, expected); - assertEq(propertyArgv, expected); + assertEquals(aliasedArgv, expected); + assertEquals(propertyArgv, expected); }); test(function booleanAndAliasArrayWithOptionsHash() { @@ -95,9 +95,9 @@ test(function booleanAndAliasArrayWithOptionsHash() { h: true, _: ["derp"] }; - assertEq(aliasedArgv, expected); - assertEq(propertyArgv, expected); - assertEq(altPropertyArgv, expected); + assertEquals(aliasedArgv, expected); + assertEquals(propertyArgv, expected); + assertEquals(altPropertyArgv, expected); }); test(function booleanAndAliasUsingExplicitTrue() { @@ -115,8 +115,8 @@ test(function booleanAndAliasUsingExplicitTrue() { _: [] }; - assertEq(aliasedArgv, expected); - assertEq(propertyArgv, expected); + assertEquals(aliasedArgv, expected); + assertEquals(propertyArgv, expected); }); // regression, see https://github.com/substack/node-optimist/issues/71 @@ -126,15 +126,15 @@ test(function booleanAndNonBoolean() { boolean: "boool" }); - assertEq(parsed.boool, true); - assertEq(parsed.other, "true"); + assertEquals(parsed.boool, true); + assertEquals(parsed.other, "true"); const parsed2 = parse(["--boool", "--other=false"], { boolean: "boool" }); - assertEq(parsed2.boool, true); - assertEq(parsed2.other, "false"); + assertEquals(parsed2.boool, true); + assertEquals(parsed2.other, "false"); }); test(function booleanParsingTrue() { @@ -145,7 +145,7 @@ test(function booleanParsingTrue() { boolean: ["boool"] }); - assertEq(parsed.boool, true); + assertEquals(parsed.boool, true); }); test(function booleanParsingFalse() { @@ -156,5 +156,5 @@ test(function booleanParsingFalse() { boolean: ["boool"] }); - assertEq(parsed.boool, false); + assertEquals(parsed.boool, false); }); |
