add shared tunes test
This commit is contained in:
parent
f829f35cfa
commit
ed44f4ed0c
4 changed files with 6375 additions and 0 deletions
6317
repl/src/test/__snapshots__/shared.test.mjs.snap
Normal file
6317
repl/src/test/__snapshots__/shared.test.mjs.snap
Normal file
File diff suppressed because it is too large
Load diff
23
repl/src/test/shared.test.mjs
Normal file
23
repl/src/test/shared.test.mjs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { queryCode } from '../runtime.mjs';
|
||||
import { describe, it } from 'vitest';
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
const supabase = createClient(
|
||||
'https://pidxdsxphlhzjnzmifth.supabase.co',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBpZHhkc3hwaGxoempuem1pZnRoIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NTYyMzA1NTYsImV4cCI6MTk3MTgwNjU1Nn0.bqlw7802fsWRnqU5BLYtmXk_k-D1VFmbkHMywWc15NM',
|
||||
);
|
||||
|
||||
describe('renders shared tunes', async () => {
|
||||
const { data } = await supabase.from('code');
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue