File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const okRate = () => ({
2424describe ( 'downloads helpers' , ( ) => {
2525 afterEach ( ( ) => {
2626 vi . unstubAllEnvs ( )
27+ vi . unstubAllGlobals ( )
2728 } )
2829
2930 it ( 'calculates hour start boundaries' , ( ) => {
@@ -62,6 +63,17 @@ describe('downloads helpers', () => {
6263 } )
6364
6465 it ( 'records zip downloads through the internal mutation path' , async ( ) => {
66+ class MockResponse {
67+ status : number
68+ headers : Headers
69+
70+ constructor ( _body ?: BodyInit | null , init ?: ResponseInit ) {
71+ this . status = init ?. status ?? 200
72+ this . headers = new Headers ( init ?. headers )
73+ }
74+ }
75+ vi . stubGlobal ( 'Response' , MockResponse as unknown as typeof Response )
76+
6577 const runQuery = vi . fn ( async ( _query : unknown , args : Record < string , unknown > ) => {
6678 if ( isRateLimitArgs ( args ) ) return okRate ( )
6779 if ( 'slug' in args ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export default defineConfig({
99 hookTimeout : 15_000 ,
1010 exclude : [
1111 '**/node_modules/**' ,
12+ '**/.output/**' ,
13+ '**/.nitro/**' ,
1214 '**/dist/**' ,
1315 '**/coverage/**' ,
1416 '**/convex/_generated/**' ,
@@ -35,6 +37,8 @@ export default defineConfig({
3537 ] ,
3638 exclude : [
3739 'node_modules/' ,
40+ '.output/' ,
41+ '.nitro/' ,
3842 'dist/' ,
3943 'coverage/' ,
4044 'convex/_generated/' ,
You can’t perform that action at this time.
0 commit comments