tests/instruments.test.js
- import { describe, it, expect } from "vitest";
- import { INSTRUMENTS } from "../src/model/instruments.js";
- describe("INSTRUMENTS", () => {
-
- it("holds 16 GM Level-1 families keyed by family name, each with 8 program names in canonical GM 1.0 ordering", () => {
- const families = Object.keys(INSTRUMENTS);
- expect(families).toHaveLength(16);
- expect(Object.values(INSTRUMENTS).every((list) => list.length === 8)).toBe(
- true,
- );
- expect(families[0]).toBe("Piano");
- expect(families[1]).toBe("Chromatic Percussion");
- expect(families[15]).toBe("Sound Effects");
- expect(INSTRUMENTS.Piano[0]).toBe("Acoustic Grand Piano");
- expect(INSTRUMENTS["Sound Effects"][7]).toBe("Gunshot");
- });
- });