strudel/test/shared.test.mjs
Felix Roos 818cd9044b integrate repl into astro website
+ update build and setup tasks + workflow
+ move repl test folder to root
+ move docs and repl to website/src
2022-12-22 17:20:51 +01:00

18 lines
522 B
JavaScript

import { queryCode } from '../runtime.mjs';
import { describe, it } from 'vitest';
import data from './dbdump.json';
describe('renders shared tunes', async () => {
data.forEach(({ id, code, hash }) => {
const url = `https://strudel.tidalcycles.org/?${hash}`;
it(`shared tune ${id} ${url}`, async ({ expect }) => {
if (code.includes('import(')) {
console.log('skip', url);
return;
}
const haps = await queryCode(code, 1);
expect(haps).toMatchSnapshot();
});
});
});