This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/structural/test/result.ts
T

10 lines
298 B
TypeScript

import * as t from "..";
test(".toError converts to a special TypeError type", () => {
const type = t.value("hello");
const result = type.check("world");
const resultType = t.instanceOf(t.Err);
const err = resultType.check(result);
expect(err.toError()).toBeInstanceOf(t.TypeError);
});