File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
dev-packages/cloudflare-integration-tests Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function createRunner(...paths: string[]) {
86
86
}
87
87
return this ;
88
88
} ,
89
- start : function ( ) : StartResult {
89
+ start : function ( signal ?: AbortSignal ) : StartResult {
90
90
const { resolve, reject, promise : isComplete } = deferredPromise ( cleanupChildProcesses ) ;
91
91
const expectedEnvelopeCount = expectedEnvelopes . length ;
92
92
@@ -155,7 +155,7 @@ export function createRunner(...paths: string[]) {
155
155
'--var' ,
156
156
`SENTRY_DSN:http://public@localhost:${ mockServerPort } /1337` ,
157
157
] ,
158
- { stdio } ,
158
+ { stdio, signal } ,
159
159
) ;
160
160
161
161
CLEANUP_STEPS . add ( ( ) => {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { expect, it } from 'vitest';
2
2
import { eventEnvelope } from '../../expect' ;
3
3
import { createRunner } from '../../runner' ;
4
4
5
- it ( 'Basic error in fetch handler' , async ( ) => {
5
+ it ( 'Basic error in fetch handler' , async ( { signal } ) => {
6
6
const runner = createRunner ( __dirname )
7
7
. expect (
8
8
eventEnvelope ( {
@@ -26,7 +26,7 @@ it('Basic error in fetch handler', async () => {
26
26
} ,
27
27
} ) ,
28
28
)
29
- . start ( ) ;
29
+ . start ( signal ) ;
30
30
await runner . makeRequest ( 'get' , '/' , { expectError : true } ) ;
31
31
await runner . completed ( ) ;
32
32
} ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createRunner } from '../../../runner';
6
6
// want to test that the instrumentation does not break in our
7
7
// cloudflare SDK.
8
8
9
- it ( 'traces a basic message creation request' , async ( ) => {
9
+ it ( 'traces a basic message creation request' , async ( { signal } ) => {
10
10
const runner = createRunner ( __dirname )
11
11
. ignore ( 'event' )
12
12
. expect ( envelope => {
@@ -35,7 +35,7 @@ it('traces a basic message creation request', async () => {
35
35
] ) ,
36
36
) ;
37
37
} )
38
- . start ( ) ;
38
+ . start ( signal ) ;
39
39
await runner . makeRequest ( 'get' , '/' ) ;
40
40
await runner . completed ( ) ;
41
41
} ) ;
Original file line number Diff line number Diff line change 1
1
import { expect , it } from 'vitest' ;
2
2
import { createRunner } from '../../../runner' ;
3
3
4
- it ( 'traces a durable object method' , async ( ) => {
4
+ it ( 'traces a durable object method' , async ( { signal } ) => {
5
5
const runner = createRunner ( __dirname )
6
6
. expect ( envelope => {
7
7
const transactionEvent = envelope [ 1 ] ?. [ 0 ] ?. [ 1 ] ;
@@ -21,7 +21,7 @@ it('traces a durable object method', async () => {
21
21
} ) ,
22
22
) ;
23
23
} )
24
- . start ( ) ;
24
+ . start ( signal ) ;
25
25
await runner . makeRequest ( 'get' , '/hello' ) ;
26
26
await runner . completed ( ) ;
27
27
} ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createRunner } from '../../../runner';
6
6
// want to test that the instrumentation does not break in our
7
7
// cloudflare SDK.
8
8
9
- it ( 'traces a basic chat completion request' , async ( ) => {
9
+ it ( 'traces a basic chat completion request' , async ( { signal } ) => {
10
10
const runner = createRunner ( __dirname )
11
11
. ignore ( 'event' )
12
12
. expect ( envelope => {
@@ -37,7 +37,7 @@ it('traces a basic chat completion request', async () => {
37
37
] ) ,
38
38
) ;
39
39
} )
40
- . start ( ) ;
40
+ . start ( signal ) ;
41
41
await runner . makeRequest ( 'get' , '/' ) ;
42
42
await runner . completed ( ) ;
43
43
} ) ;
You can’t perform that action at this time.
0 commit comments