Skip to content

feat: add tests for globalHandler.test.ts, addHandler.test.ts, payHandler.test.ts #6

feat: add tests for globalHandler.test.ts, addHandler.test.ts, payHandler.test.ts

feat: add tests for globalHandler.test.ts, addHandler.test.ts, payHandler.test.ts #6

Triggered via pull request September 28, 2024 02:02
Status Failure
Total duration 25s
Artifacts

codecov.yml

on: pull_request
Run tests and collect coverage
16s
Run tests and collect coverage
Fit to window
Zoom out
Zoom in

Annotations

10 errors
__tests__/globalHandler.test.ts > globalHandler > should call startHandler for /start command: __tests__/globalHandler.test.ts#L51
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:51:15
__tests__/globalHandler.test.ts > globalHandler > should call sendMessage for /help command: __tests__/globalHandler.test.ts#L59
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:59:15
__tests__/globalHandler.test.ts > globalHandler > should call addHandler for /add command: __tests__/globalHandler.test.ts#L67
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:67:15
__tests__/globalHandler.test.ts > globalHandler > should call individualBalanceHandler for /balance command: __tests__/globalHandler.test.ts#L75
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:75:15
__tests__/globalHandler.test.ts > globalHandler > should call groupBalanceHandler for /groupbalance command: __tests__/globalHandler.test.ts#L83
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:83:15
__tests__/globalHandler.test.ts > globalHandler > should call payHandler for /pay command: __tests__/globalHandler.test.ts#L91
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:91:15
__tests__/globalHandler.test.ts > globalHandler > should call sendMessage for unrecognized command: __tests__/globalHandler.test.ts#L99
TypeError: default is not a function ❯ __tests__/globalHandler.test.ts:99:15
__tests__/payHandler.test.ts: libs/prisma.ts#L4
Error: [vitest] No "PrismaClient" export is defined on the "@prisma/client" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("@prisma/client"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ libs/prisma.ts:4:20 ❯ src/handlers/payHandler.ts:2:31
Run tests and collect coverage
Process completed with exit code 1.