hyperaudio / hyperaudio-lite

Hyperaudio Lite - a Super-lightweight Interactive Transcript Player

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix failing test (`updateTranscriptVisualState`)

maboa opened this issue · comments

updateTranscriptVisualState

    expect(received).toStrictEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Object {
    -   "currentParaIndex": 1,
    +   "currentParentElementIndex": 1,
        "currentWordIndex": 7,
      }

      107 |   ht.currentTime = 8.106641;
      108 |
    > 109 |   expect(ht.updateTranscriptVisualState(ht.currentTime)).toStrictEqual(expectedResult);
          |                                                          ^
      110 | });
      111 |
      112 | test("media playback - click on word", () => {

      at Object.<anonymous> (__TEST__/hyperaudio-lite.test.js:109:58)
      at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
      at runJest (node_modules/@jest/core/build/runJest.js:404:19)
      at _run10000 (node_modules/@jest/core/build/cli/index.js:320:7)
      at runCLI (node_modules/@jest/core/build/cli/index.js:173:3)

Fixed with #104