mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-24 06:10:38 +08:00
Co-authored-by: Thomas Scholtes <geigerzaehler@axiom.fm> Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
15 lines
496 B
TypeScript
15 lines
496 B
TypeScript
import { describe, expect, test } from "vitest";
|
|
import { testExports } from "@app/views/projects/router";
|
|
|
|
// Defining the window.origin value, since vitest doesn't provide one.
|
|
window.origin = "http://localhost:3000";
|
|
|
|
describe("isOid", () => {
|
|
test.each([
|
|
{ oid: "a64ae9c6d572e0ad906faa9a4a7a8d43f113278c", expected: true },
|
|
{ oid: "a64ae9c", expected: false },
|
|
])("isOid $oid => $expected", ({ oid, expected }) => {
|
|
expect(testExports.isOid(oid)).toEqual(expected);
|
|
});
|
|
});
|