Skip to content

Frontend tests and what to run

Terminal window
npm test # node --test tests/*.test.ts
npx tsc --noEmit -p . # type check (strict, no unused locals or parameters)

The tests use the built-in node:test runner. Node 23.6 or newer runs TypeScript directly; on Node 22 add --experimental-strip-types. Most test a pure frontend module (one with no Tauri or React imports, so Node can load it); the guard tests at the end read the sources instead and enforce rules that would otherwise only fail in the running app.

Test What it covers
midiEdit.test.ts The Piano Roll functions in src/midiEdit.ts: grid lengths, snapping, quantize with strength, swing and ends, and the rest.
ccCurves.test.ts Controller lane curves (src/ccCurves.ts): curve shapes, ramps, Create Ramp, Thin Out.
eventList.test.ts The Event List’s positions across tempo and signature changes, typed values and edits.
noteSelect.test.ts Edit › Select on notes and events in the Piano Roll and the Event List.
stepInput.test.ts Step Input: step lengths through the tempo map, the chord and advance state machine, the region edits.
stepSeq.test.ts The Step Sequencer: step edits, rows, paint values for each edit mode, names, the rows of a new pattern by instrument, the playing step of each row.
snap.test.ts The snap grid (snapStep, snapPos in src/time.ts): Bar, Beat, Division, Ticks and Smart in each signature.
textFit.test.ts Long paths shortened at a separator (src/textFit.ts).
tempo.test.ts src/tempo.ts, the mirror of the engine’s tempo map.
musicalMove.test.ts Region moves and nudges in bars and beats through the tempo map.
audioEdit.test.ts The Audio Track Editor’s range arithmetic (src/audioRange.ts).
regionSelect.test.ts Edit › Select’s region criteria (src/regionSelect.ts).
regionParams.test.ts The Region inspector’s playback parameter values.
regionGain.test.ts The region gain handle’s geometry and arithmetic.
fades.test.ts Fade curves and crossfades for drawing, mirroring fades.rs.
dragModes.test.ts The drag preview’s copy of drag_modes.rs, with the Rust module’s cases.
newTrackDrag.test.ts Which source lanes a drag past the last track makes new tracks for (src/newTrackDrag.ts).
comps.test.ts Take folder comp names and the folder’s name bar label.
arrangement.test.ts The Arrangement track’s drawing and drag helpers.
tools.test.ts The Tracks area’s tools (src/tools.ts) and the marquee (src/marquee.ts).
overview.test.ts The overview strip’s mapping: time, track rows, the visible-area box, scroll and zoom drags.
scrolling.test.ts Mouse Wheel Scrolls (src/wheel.ts) and bringing the playhead into view (revealLeft in src/view.ts).
trackHeader.test.ts Track header layouts by height, the volume slider’s meter scale, and region name bars (src/regionBar.ts).
autoLanes.test.ts Automation curves, Show Used Automation, the extra lanes and their boxes.
laneFollow.test.ts The shown lane following a plug-in moved to another track.
alternatives.test.ts Backup labels, alternative names and track alternatives (src/alternativesModel.ts).
bounceFormat.test.ts The Bounce dialog’s formats, resolutions and file names.
fxFormat.test.ts Built-in effect readouts and control mapping.
fxShapes.test.ts The curves the modulation, distortion and Gain panels draw, against the engine’s values.
paneSizes.test.ts Pane sizes (src/paneSizes.ts): limits, malformed saved sizes, the Tracks area’s minimum and the bottom section’s room; guards that the window’s grid column can’t grow with its content and that the bottom panes shrink.
presetBox.test.ts The preset pop-up’s label (src/presetBox.ts): the loaded preset’s name, “(edited)”, “Default” and “Manual”.
fxDock.test.ts Plug-in panels docked or floating: the slot toggle, closing back, one Channel EQ at a time, Esc, pruning, resize maths and saved sizes.
linearPhaseEq.test.ts The Linear Phase EQ’s parameters as Channel EQ settings.
cpuMeter.test.ts The CPU meter’s tooltip, its figure and colour bands, and where its peak tick goes.
sliderKeys.test.ts Keyboard control of knobs, faders and sliders (src/sliderKeys.ts): steps, ends, rounding and switch positions, the ARIA props.
focusRing.test.ts When the keyboard focus ring shows (src/focusRing.ts): on after Tab, off after a mouse press.
stripMeters.test.ts The clip indicator readout and the gain-reduction meter.
vca.test.ts VCA offsets and loop checks in the Mixer.
trackOff.test.ts Whether a track is off through its stacks (src/trackOff.ts), and the power button’s tooltip.
controllers.test.ts Controller assignment types and labels (MIDI Learn).
keyFormat.test.ts Shortcuts written as each platform’s menu bar writes them; on Linux against gtkKeyLabels.json, the pairs menu.rs’s tests check against GTK.
menuLabels.test.ts Guard: the menu bar (menu.rs) uses the names in src/menuLabels.ts, both Edit menus have the same layout, right-click short names only drop “Regions”, and no key is both an accelerator and a key command (or missing from MENU_SHORTCUTS).
menuBar.test.ts The menu bar’s item states from the in-app menus and key commands, and sending only what changed (src/menuBarModel.ts).
pluginKeys.test.ts Keys forwarded from a plug-in’s editor window become the KeyboardEvent the main window would see.
detach.test.ts Detached windows (src/detachModel.ts): panel keys and labels, the shared UI state, fitting windows onto the monitors.
sheetKeys.test.ts Which keys reach the app while sheets are open (src/sheetKeysModel.ts), and that every sheet registers with sheetKeys.ts.
storeSelectors.test.ts Guard: no useStore, useEd or useSettings selector builds a new array or object on each call (which re-renders forever and blanks the window).
commands.test.ts Guard: every key command and native menu item is handled, and no two key commands share a default key.
tauriCommands.test.ts Guard: every Tauri command the frontend calls is registered, and each call passes its required arguments in camelCase and nothing else.
pianoRollModel.test.ts The Piano Roll’s lanes, what a point hits, its grid sums in musical time, where a region opens and the lane’s share.
regionGrab.test.ts What a press on a region in the Tracks area grabs: the loop tool, trims and fades.
audioEditorModel.test.ts The Audio Track Editor’s layout, zoom range and what a press grabs.
automationParams.test.ts Automation parameters: labels, each strip’s list, Stereo Out as a track, the lane’s scale.
settingsText.test.ts The MIDI monitor’s wording, plug-in types and the Recovery sheet’s texts.
updateCheck.test.ts The update check (src/updateCheck.ts): reading tags as versions, semver precedence with prereleases, each channel’s newest release (drafts and non-version tags skipped), when an update is offered, and what the check says.
compressorModel.test.ts The transfer curve’s copy of static_reduction for each circuit.
dynScale.test.ts The dynamics panels’ value formatting and knob maths.
styles.test.ts Guard: src/styles/index.css imports every stylesheet exactly once with the tokens first, no other file imports CSS, and each file’s braces balance; no raw hex colour outside tokens.css; every font size from the type scale; tokens.css matches Studio in themes.ts; the focus ring.
browserDialogs.test.ts Guard: no window.prompt, confirm or alert in src/ (macOS’s web view doesn’t implement them; use askName or the dialog plug-in).
contrast.test.ts Guard: in every theme of themes.ts, --text, --dim and --faint are at least 4.5:1 (WCAG) on each surface text sits on, --lcd-label on the LCD, and the three stay in that order.
  • cargo test -p daw-engine --lib and cargo test -p daw
  • every headless example that touches your area (for engine changes, scripts/headless-checks.sh and the plug-in checks pdc_check and freeze_check); for a built-in effect, fx_check and fx_bench
  • npm test, npx tsc --noEmit -p . and npm run build (the Vite bundle and CSS)
  • cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --all --check
  • a visual check in the running app for UI changes

Marbble is released under the MIT licence.Source on GitHub.