Skip to content

feat: Include unit tests for data processing #66

feat: Include unit tests for data processing

feat: Include unit tests for data processing #66

Triggered via pull request February 17, 2025 21:47
Status Failure
Total duration 36s
Artifacts

visual-debugger-ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
Unhandled error: visual-debugger/src/data-processing/queryBuild.ts#L22
ReferenceError: alert is not defined ❯ Module.buildQueryDataset src/data-processing/queryBuild.ts:22:9 ❯ src/data-processing/tests/queryBuild.test.ts:25:16 ❯ node_modules/@vitest/runner/dist/index.js:146:14 ❯ node_modules/@vitest/runner/dist/index.js:533:11 ❯ runWithTimeout node_modules/@vitest/runner/dist/index.js:39:7 ❯ runTest node_modules/@vitest/runner/dist/index.js:1056:17 ❯ processTicksAndRejections node:internal/process/task_queues:95:5 ❯ runSuite node_modules/@vitest/runner/dist/index.js:1205:15 ❯ runSuite node_modules/@vitest/runner/dist/index.js:1205:15 ❯ runFiles node_modules/@vitest/runner/dist/index.js:1262:5 This error originated in "src/data-processing/tests/queryBuild.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "src/data-processing/tests/queryBuild.test.ts". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
Unhandled error: visual-debugger/src/data-processing/queryBuild.ts#L22
ReferenceError: alert is not defined ❯ Module.buildQueryDataset src/data-processing/queryBuild.ts:22:9 ❯ src/data-processing/tests/queryBuild.test.ts:29:16 ❯ node_modules/@vitest/runner/dist/index.js:146:14 ❯ node_modules/@vitest/runner/dist/index.js:533:11 ❯ runWithTimeout node_modules/@vitest/runner/dist/index.js:39:7 ❯ runTest node_modules/@vitest/runner/dist/index.js:1056:17 ❯ processTicksAndRejections node:internal/process/task_queues:95:5 ❯ runSuite node_modules/@vitest/runner/dist/index.js:1205:15 ❯ runSuite node_modules/@vitest/runner/dist/index.js:1205:15 ❯ runFiles node_modules/@vitest/runner/dist/index.js:1262:5 This error originated in "src/data-processing/tests/queryBuild.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "src/data-processing/tests/queryBuild.test.ts". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
src/data-processing/tests/changeElements.test.ts > changePlan > Index out of bounds: visual-debugger/src/data-processing/tests/changeElements.test.ts#L45
AssertionError: expected undefined to be a function ❯ src/data-processing/tests/changeElements.test.ts:45:32
src/data-processing/tests/changeElements.test.ts > changePlan > planDatesetStore is empty: visual-debugger/src/data-processing/tests/changeElements.test.ts#L52
AssertionError: expected undefined to be a function ❯ src/data-processing/tests/changeElements.test.ts:52:31
src/data-processing/tests/changeElements.test.ts > changePlan > defaultPlanDatasetStore is empty: visual-debugger/src/data-processing/tests/changeElements.test.ts#L59
AssertionError: expected undefined to be a function ❯ src/data-processing/tests/changeElements.test.ts:59:31
src/data-processing/tests/changeElements.test.ts > changeItinerary > Index out of bounds: visual-debugger/src/data-processing/tests/changeElements.test.ts#L75
AssertionError: expected undefined to be a function ❯ src/data-processing/tests/changeElements.test.ts:75:37
src/data-processing/tests/changeElements.test.ts > changeDefaultItinerary > Index out of bounds: visual-debugger/src/data-processing/tests/changeElements.test.ts#L91
AssertionError: expected undefined to be a function ❯ src/data-processing/tests/changeElements.test.ts:91:44
src/data-processing/tests/comparePlans.test.ts > comparePlans > planDatasetStore is empty: visual-debugger/src/data-processing/comparePlans.ts#L42
ReferenceError: alert is not defined ❯ comparePlans src/data-processing/comparePlans.ts:42:13 ❯ src/data-processing/tests/comparePlans.test.ts:44:16
src/data-processing/tests/comparePlans.test.ts > comparePlans > defaultPlanDatesetStore is empty: visual-debugger/src/data-processing/planParsing.ts#L110
TypeError: Cannot read properties of undefined (reading 'itineraries') ❯ resetCssClassesForPlanEntries src/data-processing/planParsing.ts:110:28 ❯ comparePlans src/data-processing/comparePlans.ts:32:9 ❯ src/data-processing/tests/comparePlans.test.ts:53:16
src/data-processing/tests/planParsing.test.ts > computePlan > interpolatedQueryStore is empty: visual-debugger/src/data-processing/tests/planParsing.test.ts#L37
AssertionError: expected [] to deeply equal [ Plan{ requestParameters: '', …(7) } ] - Expected + Received - Array [ - Plan { - "debugOutput": Array [], - "direct": Array [], - "from": Place { - "arrival": "", - "departure": "", - "lat": 0, - "level": 0, - "lon": 0, - "name": "", - "scheduledArrival": "", - "scheduledDeparture": "", - "scheduledTrack": "", - "stopId": "", - "track": "", - "vertexType": "", - }, - "itineraries": Array [], - "nextPageCursor": "", - "previousPageCursor": "", - "requestParameters": "", - "to": Place { - "arrival": "", - "departure": "", - "lat": 0, - "level": 0, - "lon": 0, - "name": "", - "scheduledArrival": "", - "scheduledDeparture": "", - "scheduledTrack": "", - "stopId": "", - "track": "", - "vertexType": "", - }, - }, - ] + Array [] ❯ src/data-processing/tests/planParsing.test.ts:37:29