basic snapshot test for tunes

This commit is contained in:
Felix Roos 2022-05-01 22:34:11 +02:00
parent 3eebccd566
commit 6cac8ba108
8 changed files with 9326 additions and 723 deletions

11
repl/src/shoot.mjs Normal file
View file

@ -0,0 +1,11 @@
// this script will render all example tunes and log them to the console.
// it is intended to be written to tunes.snapshot.mjs using `npm run snapshot`
import * as tunes from '../tunes.mjs';
import { queryCode } from './runtime.mjs';
Object.entries(tunes).forEach(([key, code]) => {
queryCode(code, 1).then((haps) => {
console.log(`export const ${key} = ${JSON.stringify(haps, null, 1)}`);
});
});