Tooling

Testing and running

Run a package, run tests, and use the direct CLI when needed.

What

Testing and execution are split by scope:

  • package scope with musi
  • direct source/artifact scope with music

Why

This split keeps quick one-off checks and team workflow checks both fast.

How

Use package commands in normal development:

musi run
musi check
musi build
musi test

Compare

A small test entry should read like ordinary code. Musi uses export let test () inside *.test.ms files.

Musi package tests are discovered by file name, then run through musi test.

let Testing := import "@std/testing";

export let test () :=
  Testing.it("adds values", Testing.to_be(1 + 2, 3));

When

Use tests for routine verification.

  • keep tests in *.test.ms
  • expose each test with exported test
let Testing := import "@std/testing";

export let test () :=
  Testing.it("adds values", Testing.to_be(1 + 2, 3));
music check index.ms
music build index.ms
music run index.seam

Analogy

Like project commands in a framework plus one-off script execution when needed.

Try it

Run one package command and one direct command, then revisit any chapter where behavior is unclear.

See Reference for source, grammar, extension, and issue links.