Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(client): port prisma promise (#14032)
* refactor: remove old promise tests * test: add new promise tests * test: add coverage for all methods
- Loading branch information
Showing
11 changed files
with
338 additions
and
263 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
packages/client/src/__tests__/integration/happy/prisma-promises/.gitignore
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-52 KB
packages/client/src/__tests__/integration/happy/prisma-promises/dev.db
Binary file not shown.
29 changes: 0 additions & 29 deletions
29
packages/client/src/__tests__/integration/happy/prisma-promises/schema.prisma
This file was deleted.
Oops, something went wrong.
65 changes: 0 additions & 65 deletions
65
packages/client/src/__tests__/integration/happy/prisma-promises/test.ts
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/client/src/__tests__/integration/happy/prismaPromise/.gitignore
This file was deleted.
Oops, something went wrong.
Binary file not shown.
66 changes: 0 additions & 66 deletions
66
packages/client/src/__tests__/integration/happy/prismaPromise/schema.prisma
This file was deleted.
Oops, something went wrong.
101 changes: 0 additions & 101 deletions
101
packages/client/src/__tests__/integration/happy/prismaPromise/test.ts
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
packages/client/tests/functional/prisma-promise/_matrix.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { defineMatrix } from '../_utils/defineMatrix' | ||
|
||
export default defineMatrix(() => [ | ||
[ | ||
{ | ||
provider: 'sqlite', | ||
}, | ||
{ | ||
provider: 'postgresql', | ||
}, | ||
{ | ||
provider: 'mysql', | ||
}, | ||
{ | ||
provider: 'sqlserver', | ||
}, | ||
{ | ||
provider: 'cockroachdb', | ||
}, | ||
{ | ||
provider: 'mongodb', | ||
}, | ||
], | ||
]) |
21 changes: 21 additions & 0 deletions
21
packages/client/tests/functional/prisma-promise/prisma/_schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { idForProvider } from '../../_utils/idForProvider' | ||
import testMatrix from '../_matrix' | ||
|
||
export default testMatrix.setupSchema(({ provider }) => { | ||
return /* Prisma */ ` | ||
datasource db { | ||
provider = "${provider}" | ||
url = env("DATABASE_URI_${provider}") | ||
} | ||
generator client { | ||
provider = "prisma-client-js" | ||
binaryTargets = ["native"] | ||
} | ||
model User { | ||
id ${idForProvider(provider)} | ||
email String @unique | ||
} | ||
` | ||
}) |
Oops, something went wrong.