mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
Merge pull request #1381 from lts372005/fp-attempt-9001
Unit test / Util / hasProperty
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
import "./local/snowflake.ts";
|
||||
import "./util/validateLength.ts";
|
||||
import "./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);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user