Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update prisma schema according to discussion #223

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

kachar
Copy link
Member

@kachar kachar commented Apr 27, 2022

@dimitur2204 dimitur2204 changed the title Update prisma schema according to the discussion Update prisma schema to implement the new Transaction object Apr 28, 2022
@dimitur2204 dimitur2204 changed the title Update prisma schema to implement the new Transaction object Update prisma schema according to discussion Apr 28, 2022
@github-actions
Copy link

github-actions bot commented Apr 28, 2022

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/usr/local/bin/yarn' failed with exit code 1
St.
Category Percentage Covered / Total
🟡 Statements
72.5% (-1.5% 🔻)
1189/1640
🔴 Branches
30.33% (-1.42% 🔻)
64/211
🔴 Functions
45.09% (-2.22% 🔻)
156/346
🟡 Lines
70.46% (-1.47% 🔻)
1028/1459
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / transfer.service.ts
27.27% (-68.18% 🔻)
0% (-100% 🔻)
16.67% (-83.33% 🔻)
23.53% (-70.59% 🔻)

Test suite run failed

Failed tests: 0/119. Failed suites: 1/49.
  ● Test suite failed to run

    apps/api/src/transfer/transfer.controller.spec.ts:85:52 - error TS2345: Argument of type '({ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; })[]' is not assignable to parameter of type 'Transfer[] | PrismaPromise<Transfer[]>'.
      Type '({ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; })[]' is not assignable to type 'Transfer[]'.
        Type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to type 'Transfer'.
          Property 'tax' is missing in type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' but required in type 'Transfer'.

    85     prismaMock.transfer.findMany.mockResolvedValue(mockData)
                                                          ~~~~~~~~

      node_modules/.prisma/client/index.d.ts:317:3
        317   tax: number
              ~~~
        'tax' is declared here.
    apps/api/src/transfer/transfer.controller.spec.ts:96:54 - error TS2345: Argument of type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to parameter of type 'Transfer | Prisma__TransferClient<Transfer | null> | null'.
      Type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' is not assignable to type 'Transfer | Prisma__TransferClient<Transfer | null> | null'.
        Type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' is not assignable to type 'Transfer'.

    96     prismaMock.transfer.findUnique.mockResolvedValue(transfer)
                                                            ~~~~~~~~
    apps/api/src/transfer/transfer.controller.spec.ts:124:50 - error TS2345: Argument of type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to parameter of type 'Transfer | Prisma__TransferClient<Transfer>'.
      Type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' is not assignable to type 'Transfer | Prisma__TransferClient<Transfer>'.
        Type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' is not assignable to type 'Transfer'.

    124     prismaMock.transfer.create.mockResolvedValue(transfer)
                                                         ~~~~~~~~
    apps/api/src/transfer/transfer.controller.spec.ts:146:50 - error TS2345: Argument of type '{ reason: string; id: string; status: "initial"; currency: "BGN"; amount: number; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to parameter of type 'Transfer | Prisma__TransferClient<Transfer>'.
      Type '{ reason: string; id: string; status: "initial"; currency: "BGN"; amount: number; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' is not assignable to type 'Transfer | Prisma__TransferClient<Transfer>'.
        Property 'tax' is missing in type '{ reason: string; id: string; status: "initial"; currency: "BGN"; amount: number; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; }' but required in type 'Transfer'.

    146     prismaMock.transfer.update.mockResolvedValue({ ...transfer, reason: 'random' })
                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      node_modules/.prisma/client/index.d.ts:317:3
        317   tax: number
              ~~~
        'tax' is declared here.
    apps/api/src/transfer/transfer.controller.spec.ts:159:50 - error TS2345: Argument of type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to parameter of type 'Transfer | Prisma__TransferClient<Transfer>'.

    159     prismaMock.transfer.update.mockResolvedValue(transfer)
                                                         ~~~~~~~~
    apps/api/src/transfer/transfer.controller.spec.ts:185:50 - error TS2345: Argument of type '{ id: string; status: "initial"; currency: "BGN"; amount: number; reason: string; targetDate: Date; documentId: string; approvedById: string; sourceCampaignId: string; targetCampaignId: string; sourceVaultId: string; targetVaultId: string; createdAt: Date; updatedAt: null; } | { ...; } | { ...; }' is not assignable to parameter of type 'Transfer | Prisma__TransferClient<Transfer>'.

    185     prismaMock.transfer.delete.mockResolvedValue(transfer)
                                                         ~~~~~~~~

Report generated by 🧪jest coverage report action from 45f494e

@imilchev imilchev force-pushed the master branch 4 times, most recently from d4c5b9e to 89decc9 Compare July 30, 2022 21:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants