import { describe, expect, it } from "vitest"; import { content } from "../src/index"; describe("content bundle", () => { it("contains every kind of content", () => { expect(content.locations).toHaveLength(5); expect(content.shipModels).toHaveLength(4); expect(content.purchasableShipModels).toHaveLength(3); expect(content.cargoTypes).toHaveLength(4); expect(content.skills).toHaveLength(4); expect(content.config.timeCompression).toBe(60); }); it("looks up one item of each kind by id", () => { expect(content.location("mars")?.name).toBe("Mars"); expect(content.shipModel("freighter")?.name).toBe("Freighter"); expect(content.cargoType("dangerous")?.name).toBe("Dangerous"); expect(content.skill("long-haul")?.name).toBe("Long Haul"); }); it("returns undefined for an unknown id without throwing", () => { expect(content.location("pluto")).toBeUndefined(); expect(content.shipModel("x-wing")).toBeUndefined(); expect(content.cargoType("cheese")).toBeUndefined(); expect(content.skill("juggling")).toBeUndefined(); }); });