Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

test(client): add relationMode datasource property tests for all databases #14221

Merged
merged 141 commits into from Oct 13, 2022

Conversation

Jolg42
Copy link
Member

@Jolg42 Jolg42 commented Jul 8, 2022

Related: #10806

RELATION_MODE=foreignKeys pnpm run test:functional:code --relation-mode-tests-only
RELATION_MODE=prisma pnpm run test:functional:code --relation-mode-tests-only
pnpm run test:functional:code --relation-mode-tests-only

# Or only one relation type by providing the file name:
pnpm run test:functional:code --relation-mode-tests-only relationMode/tests_m-to-n.ts
How to run - Previously (early commit)
RELATION_MODE=foreignKeys pnpm run test:functional:code relationMode
RELATION_MODE=prisma pnpm run test:functional:code relationMode
pnpm run test:functional:code relationMode

# Or only one relation type by providing the file name:
pnpm run test:functional:code relationMode/tests_m-to-n.ts

and before

RI=foreignKeys pnpm run test:functional:code referential-integrity
RI=prisma pnpm run test:functional:code referential-integrity
pnpm run test:functional:code referential-integrity

# Or only one relation type by providing the file name:
pnpm run test:functional:code referential-integrity/tests_m-to-n.ts

Internal Notion pages

@Jolg42 Jolg42 force-pushed the joel/referential-integrity branch from 47b552b to 95e3bb9 Compare July 8, 2022 15:39
Related: #10806

Test Suites: 1 failed, 1 total
Tests:       3 failed, 45 passed, 48 total
Snapshots:   0 total
Time:        9.838 s
@Jolg42 Jolg42 force-pushed the joel/referential-integrity branch from 95e3bb9 to 6b7f842 Compare July 8, 2022 15:50
@jkomyno
Copy link
Contributor

jkomyno commented Jul 12, 2022

Note: referentialIntegrity: "prisma" already shows differences w.r.t. referentialIntegrity: "foreignKeys":

  • 1:1 mandatory (explicit) › [create] child with non existing parent should throw doesn't throw a foreign key constraint violation error
  • slightly different logs (e.g., mentioning the userId column rather than id)

Copy link
Member Author

@Jolg42 Jolg42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: we need to await expect(...).rejects/resolves. (see linting errors)

@Jolg42 Jolg42 changed the title test(client): relationMode tests test(client): add relationMode datasource property tests for all databases Oct 13, 2022
@Jolg42 Jolg42 self-assigned this Oct 13, 2022
@Jolg42 Jolg42 merged commit 99487a7 into main Oct 13, 2022
@Jolg42 Jolg42 deleted the joel/referential-integrity branch October 13, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants