Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

easDeviceHostsSettings.logic.test.ts

21 lines783 Bytes

1import { describe, expect, it } from "vite-plus/test";
2import * as Option from "effect/Option";
3​
4import { newEasDeviceHost, parseEasDeviceHostDraft } from "./easDeviceHostsSettings.logic";
5​
6describe("EAS device host settings", () => {
7 it("rejects limits EAS does not allow", () => {
8 expect(Option.isSome(parseEasDeviceHostDraft(newEasDeviceHost("eas")))).toBe(true);
9 expect(
10 Option.isNone(parseEasDeviceHostDraft({ ...newEasDeviceHost("eas"), maxSessionMinutes: 10 })),
11 ).toBe(true);
12 expect(
13 Option.isNone(
14 parseEasDeviceHostDraft({ ...newEasDeviceHost("eas"), maxSessionMinutes: 600 }),
15 ),
16 ).toBe(true);
17 expect(Option.isNone(parseEasDeviceHostDraft({ ...newEasDeviceHost("eas"), label: " " }))).toBe(
18 true,
19 );
20 });
21});