MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / expectBeat

Function expectBeat

packages/alphatab/test/audio/MidiFileGenerator.test.ts:1415–1427  ·  view source on GitHub ↗
(
        tickLookup: MidiTickLookup,
        tick: number,
        fret: number,
        tickDuration: number,
        millisDuration: number
    )

Source from the content-addressed store, hash-verified

1413 });
1414
1415 function expectBeat(
1416 tickLookup: MidiTickLookup,
1417 tick: number,
1418 fret: number,
1419 tickDuration: number,
1420 millisDuration: number
1421 ) {
1422 const res = tickLookup.findBeat(new Set<number>([0]), tick);
1423 expect(res).toBeTruthy();
1424 expect(res!.beat.notes[0].fret).toBe(fret);
1425 expect(res!.tickDuration).toBe(tickDuration);
1426 expect(res!.duration).toBe(millisDuration);
1427 }
1428
1429 it('beat-tempo-change', async () => {
1430 /**

Callers 1

Calls 3

findBeatMethod · 0.45
toBeTruthyMethod · 0.45
toBeMethod · 0.45

Tested by

no test coverage detected