mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-29 16:02:51 -04:00
19 lines
523 B
JavaScript
19 lines
523 B
JavaScript
import { queryCode, testCycles } from '../runtime.mjs';
|
|
import * as snaps from '../tunes.snapshot.mjs';
|
|
import * as tunes from '../tunes.mjs';
|
|
import { strict as assert } from 'assert';
|
|
|
|
async function testTune(key) {
|
|
// console.log('test tune', key);
|
|
const haps = await queryCode(tunes[key], testCycles[key] || 1);
|
|
assert.deepStrictEqual(haps, snaps[key]);
|
|
}
|
|
|
|
describe('renders tunes', () => {
|
|
Object.keys(tunes).forEach((key) => {
|
|
it(`tune: ${key}`, async () => {
|
|
await testTune(key);
|
|
});
|
|
});
|
|
});
|