Skip to content

Commit 20240e0

Browse files
authored
Minor tidying (#169)
This very small PR: * Removes extraneous imports from Prisma tests * Sets `disableWarningInBrowsers` to make the browser test output less noisy * Removes `...` from a JSON snippet in the README, since GitHub highlights this as an error (in red reverse-video)
1 parent 8a8dbb6 commit 20240e0

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ Using TypeScript? No worries: types are included either way.
2727
Note: to install with npm for use by another package that declares a dependency on `pg` (node-postgres), use an alias plus an override, which will look something like this in your `package.json`:
2828

2929
```json
30-
...
3130
"dependencies": {
3231
"pg": "npm:@neondatabase/serverless@^1.0.0"
3332
},
3433
"overrides": {
3534
"pg": "npm:@neondatabase/serverless@^1.0.0"
3635
}
37-
...
3836
```
3937

4038
### Configure it

tests/browser/browser.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { expect, test, assertType } from 'vitest';
22
import { server } from '@vitest/browser/context';
3-
import { neon, Pool, Client, type QueryResult } from '@neondatabase/serverless'; // see package.json: this points to 'file:.'
3+
import {
4+
neon,
5+
neonConfig,
6+
Pool,
7+
Client,
8+
type QueryResult,
9+
} from '@neondatabase/serverless'; // see package.json: this points to 'file:.'
410

511
const DATABASE_URL = server.config.env.VITE_NEON_DB_URL!;
612

13+
neonConfig.disableWarningInBrowsers = true;
14+
715
test('log version', () => {
816
if (typeof navigator !== 'undefined') {
917
console.log(`UA: ${navigator.userAgent}`);

tests/packages/prisma/http.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from 'vitest';
2-
import { neon } from '@neondatabase/serverless'; // see package.json: this points to 'file:.'
32
import { PrismaNeonHTTP } from '@prisma/adapter-neon';
43
import { PrismaClient } from '@prisma/client';
54

tests/packages/prisma/ws.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from 'vitest';
2-
import { Pool } from '@neondatabase/serverless'; // see package.json: this points to 'file:../../../dist/npm'
32
import { PrismaNeon } from '@prisma/adapter-neon';
43
import { PrismaClient } from '@prisma/client';
54

0 commit comments

Comments
 (0)