Merge pull request #1381 from lts372005/fp-attempt-9001

Unit test / Util / hasProperty
This commit is contained in:
Skillz4Killz
2021-10-29 21:40:06 -04:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -1,2 +1,3 @@
import "./local/snowflake.ts";
import "./util/validateLength.ts";
import "./util/hasProperty.ts";
+15
View File
@@ -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);
},
});