import { toHaveLength } from "https://deno.land/x/unitest@v1.0.0-beta.82/mod.ts";
Use .toHaveLength
to check that an object has a .length
property and it is
set to a certain numeric value
import { expect, test } from "https://deno.land/x/unitest@$VERSION/mod.ts";
test("passes when object of length property equal to", () => {
expect([1, 2, 3]).toHaveLength(3);
expect("abc").toHaveLength(3);
expect("").not.toHaveLength(5);
});