Skip to content

Commit 76059e3

Browse files
committed
fix tests
1 parent b7b4af7 commit 76059e3

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

packages/schema/tests/generator/prisma-generator.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ describe('Prisma generator test', () => {
3434
provider = 'postgresql'
3535
url = env("DATABASE_URL")
3636
directUrl = env("DATABASE_URL")
37-
shadowDatabaseUrl = env("DATABASE_URL")
3837
extensions = [pg_trgm, postgis(version: "3.3.2"), uuid_ossp(map: "uuid-ossp", schema: "extensions")]
3938
schemas = ["auth", "public"]
4039
}
@@ -67,7 +66,6 @@ describe('Prisma generator test', () => {
6766
expect(content).toContain('provider = "postgresql"');
6867
expect(content).toContain('url = env("DATABASE_URL")');
6968
expect(content).toContain('directUrl = env("DATABASE_URL")');
70-
expect(content).toContain('shadowDatabaseUrl = env("DATABASE_URL")');
7169
expect(content).toContain(
7270
'extensions = [pg_trgm, postgis(version: "3.3.2"), uuid_ossp(map: "uuid-ossp", schema: "extensions")]'
7371
);
@@ -253,9 +251,9 @@ describe('Prisma generator test', () => {
253251
expect(content).toContain(`@@map("_Role")`);
254252
expect(content).toContain(`@map("admin")`);
255253
expect(content).toContain(`@map("customer")`);
256-
expect(content).toContain('/// Admin role documentation line 1\n' +
257-
' /// Admin role documentation line 2\n' +
258-
' ADMIN');
254+
expect(content).toContain(
255+
'/// Admin role documentation line 1\n' + ' /// Admin role documentation line 2\n' + ' ADMIN'
256+
);
259257
});
260258

261259
it('attribute passthrough', async () => {

packages/schema/tests/schema/validation/datasource-validation.test.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('Datasource Validation Tests', () => {
1313
cause: [
1414
{ message: 'datasource must include a "provider" field' },
1515
{ message: 'datasource must include a "url" field' },
16-
]
17-
}
18-
})
16+
],
17+
},
18+
});
1919
});
2020

2121
it('dup fields', async () => {
@@ -63,14 +63,6 @@ describe('Datasource Validation Tests', () => {
6363
}
6464
`)
6565
).toContain('"url" must be set to a string literal or an invocation of "env" function');
66-
67-
expect(
68-
await loadModelWithError(`
69-
datasource db {
70-
shadowDatabaseUrl = 123
71-
}
72-
`)
73-
).toContain('"shadowDatabaseUrl" must be set to a string literal or an invocation of "env" function');
7466
});
7567

7668
it('invalid relationMode value', async () => {
@@ -96,7 +88,6 @@ describe('Datasource Validation Tests', () => {
9688
datasource db {
9789
provider = "postgresql"
9890
url = "url"
99-
shadowDatabaseUrl = "shadow"
10091
relationMode = "prisma"
10192
}
10293
`);
@@ -105,7 +96,6 @@ describe('Datasource Validation Tests', () => {
10596
datasource db {
10697
provider = "postgresql"
10798
url = env("url")
108-
shadowDatabaseUrl = env("shadowUrl")
10999
relationMode = "foreignKeys"
110100
}
111101
`);

0 commit comments

Comments
 (0)