1import { queryCode, testCycles } from '../test/runtime.mjs'; 2import * as tunes from '../website/src/repl/tunes.mjs'; 3import { describe, bench } from 'vitest'; 4import { calculateSteps } from '../packages/core/index.mjs'; 5 6const tuneKeys = Object.keys(tunes); 7 8describe('renders tunes', () => { 9 tuneKeys.forEach((key) => { 10 describe(key, () => { 11 calculateSteps(true); 12 bench(`+steps`, async () => { 13 await queryCode(tunes[key], testCycles[key] || 1); 14 }); 15 calculateSteps(false); 16 bench(`-steps`, async () => { 17 await queryCode(tunes[key], testCycles[key] || 1); 18 }); 19 calculateSteps(true); 20 }); 21 }); 22});