@@ -14,7 +14,12 @@ const repoRoot = path.resolve(process.cwd(), '../..')
14
14
expect . addSnapshotSerializer ( {
15
15
test : ( val : unknown ) => typeof val === 'string' && val . includes ( repoRoot ) ,
16
16
print : ( val : any ) =>
17
- ( val as string ) . replaceAll ( repoRoot , '<repo>' ) . replaceAll ( / f i l e : \/ \/ .* : \d + : \d + / g, '<file>:<line>:<col>' ) ,
17
+ ( val as string )
18
+ . replaceAll ( repoRoot , '<repo>' )
19
+ . replaceAll ( / f i l e : \/ \/ .* : \d + : \d + / g, '<file>:<line>:<col>' )
20
+ . split ( '\n' )
21
+ . filter ( line => ! line . includes ( '(node:' ) )
22
+ . join ( '\n' ) ,
18
23
} )
19
24
20
25
let pool : Awaited < ReturnType < typeof createPool > >
@@ -137,8 +142,7 @@ test('syntax error', async () => {
137
142
expect ( err . stack ) . toMatchInlineSnapshot ( `
138
143
Error: [Query select_fb83277]: syntax error at or near "frooom"
139
144
at Object.query (<repo>/packages/client/src/index.ts:375:13)
140
- at processTicksAndRejections (node:internal/process/task_queues:95:5)
141
- at <repo>/packages/client/test/errors.test.ts:135:22
145
+ at <repo>/packages/client/test/errors.test.ts:140:22
142
146
at runTest (<file>:<line>:<col>)
143
147
at runSuite (<file>:<line>:<col>)
144
148
at runFiles (<file>:<line>:<col>)
@@ -154,10 +158,5 @@ test('syntax error', async () => {
154
158
at Parser.handlePacket (<repo>/node_modules/.pnpm/[email protected] /node_modules/pg-protocol/src/parser.ts:188:21)
155
159
at Parser.parse (<repo>/node_modules/.pnpm/[email protected] /node_modules/pg-protocol/src/parser.ts:103:30)
156
160
at Socket.<anonymous> (<repo>/node_modules/.pnpm/[email protected] /node_modules/pg-protocol/src/index.ts:7:48)
157
- at Socket.emit (node:events:514:28)
158
- at addChunk (node:internal/streams/readable:376:12)
159
- at readableAddChunk (node:internal/streams/readable:349:9)
160
- at Socket.Readable.push (node:internal/streams/readable:286:10)
161
- at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
162
161
` )
163
162
} )
0 commit comments