make tests a little bit faster
This commit is contained in:
parent
17d0b7d291
commit
235e82a348
2 changed files with 5 additions and 5 deletions
|
|
@ -1,17 +1,17 @@
|
|||
import { queryCode, testCycles } from '../runtime.mjs';
|
||||
import * as snaps from '../tunes.snapshot.mjs';
|
||||
import * as tunes from '../tunes.mjs';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, it } from 'vitest';
|
||||
|
||||
const tuneKeys = Object.keys(tunes);
|
||||
|
||||
async function testTune(key) {
|
||||
async function testTune(key, expect) {
|
||||
const haps = await queryCode(tunes[key], testCycles[key] || 1);
|
||||
expect(haps).toEqual(snaps[key]);
|
||||
}
|
||||
|
||||
describe.concurrent('renders tunes', () => {
|
||||
tuneKeys.slice(0, 40).forEach((key) => {
|
||||
it(`tune: ${key}`, async ({ expect }) => await testTune(key));
|
||||
tuneKeys.forEach((key) => {
|
||||
it(`tune: ${key}`, async ({ expect }) => await testTune(key, expect));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue