diff --git a/tests/local.ts b/tests/local.ts index 78baeb048..738eda31b 100644 --- a/tests/local.ts +++ b/tests/local.ts @@ -1,2 +1,3 @@ import "./local/snowflake.ts"; import "./util/validateLength.ts"; +import "./util/hasProperty.ts"; diff --git a/tests/util/hasProperty.ts b/tests/util/hasProperty.ts new file mode 100644 index 000000000..7cf0bd412 --- /dev/null +++ b/tests/util/hasProperty.ts @@ -0,0 +1,15 @@ +import { hasProperty } from "../../src/util/utils.ts"; +import { assertEquals } from "../deps.ts"; +const obj = { prop: "lts372005" }; +Deno.test({ + name: "[utils] hasProperty does HAVE property", + fn() { + assertEquals(hasProperty(obj, "prop"), true); + }, +}); +Deno.test({ + name: "[utils] hasProperty does NOT HAVE property", + fn() { + assertEquals(hasProperty(obj, "lts372005"), false); + }, +});