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 testCompare
@Test
void sums_values() {
assertEquals(3, 1 + 2);
}let Testing := import "@std/testing";
export let test () :=
Testing.it("adds values", Testing.to_be(1 + 2, 3));#[test]
fn sums_values() {
assert_eq!(1 + 2, 3);
}test("adds values", () => {
expect(1 + 2).toBe(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.seamAnalogy
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.
github.com/musi-lang/musi
musi-lang.com