Files
strudel/repl/src/test/tunes.test.mjs
T
Felix Roos 488ebf8f1a replace old tests
+ ignore tune test for now
+ add happy-dom
2022-08-06 12:22:11 +02:00

20 lines
611 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';
import { describe, it, expect } from 'vitest';
async function testTune(key) {
// console.log('test tune', key);
const haps = await queryCode(tunes[key], testCycles[key] || 1);
// assert.deepStrictEqual(haps, snaps[key]);
expect(haps).toEqual(snaps[key]);
}
describe('renders tunes', () => {
Object.keys(tunes).forEach((key) => {
it(`tune: ${key}`, async () => {
await testTune(key);
});
});
});