git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on v0.2.0 help sign in
21 lines 561 B history raw
1import { describe, it, expect } from "vitest";
2import { os, version, isTV, selectImpl } from "../src/Yoga/React/Native/Platform.js";
4describe("Platform FFI", () => {
5 it("os is a string", () => {
6 expect(typeof os).toBe("string");
7 });
9 it("version is defined", () => {
10 expect(version).toBeDefined();
11 });
13 it("isTV is a boolean", () => {
14 expect(typeof isTV).toBe("boolean");
15 });
17 it("selectImpl picks a platform value", () => {
18 const result = selectImpl({ macos: "mac", default: "other" });
19 expect(result).toBe("mac");
20 });
21});