mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-10 05:08:33 +00:00
* polish, rename, and document stepwise functions: `pace`, `take`, `drop`, `expand`, `contract`, `repeat`, `zip`, `grow`, `shrink`, and `tour`
23 lines
662 B
JavaScript
23 lines
662 B
JavaScript
import { queryCode, testCycles } from '../test/runtime.mjs';
|
|
import * as tunes from '../website/src/repl/tunes.mjs';
|
|
import { describe, bench } from 'vitest';
|
|
import { calculateSteps } from '../packages/core/index.mjs';
|
|
|
|
const tuneKeys = Object.keys(tunes);
|
|
|
|
describe('renders tunes', () => {
|
|
tuneKeys.forEach((key) => {
|
|
describe(key, () => {
|
|
calculateSteps(true);
|
|
bench(`+steps`, async () => {
|
|
await queryCode(tunes[key], testCycles[key] || 1);
|
|
});
|
|
calculateSteps(false);
|
|
bench(`-steps`, async () => {
|
|
await queryCode(tunes[key], testCycles[key] || 1);
|
|
});
|
|
calculateSteps(true);
|
|
});
|
|
});
|
|
});
|