basic snapshot test for tunes
This commit is contained in:
parent
3eebccd566
commit
6cac8ba108
8 changed files with 9326 additions and 723 deletions
14
repl/src/test/tunes.test.mjs
Normal file
14
repl/src/test/tunes.test.mjs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { queryCode } from '../runtime.mjs';
|
||||
import * as snaps from '../tunes.snapshot.mjs';
|
||||
import * as tunes from '../tunes.mjs';
|
||||
import { strict as assert } from 'assert';
|
||||
|
||||
describe('tunes', () => {
|
||||
it('renders tunes correctly', async () => {
|
||||
async function testTune(key) {
|
||||
const haps = await queryCode(tunes[key], 1);
|
||||
assert.deepStrictEqual(haps, snaps[key]);
|
||||
}
|
||||
await Promise.all(Object.keys(tunes).map(testTune));
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue