@@ -38,7 +38,7 @@ describe("server", () => {
38
38
} ;
39
39
40
40
describe ( "createIPXH3Handler" , ( ) => {
41
- it ( "IPX_MISSING_MODIFIERS" , ( ) => {
41
+ it ( "IPX_MISSING_MODIFIERS" , async ( ) => {
42
42
const handler = createIPXH3Handler ( ipx ) ;
43
43
const event = {
44
44
path : "" ,
@@ -49,14 +49,14 @@ describe("server", () => {
49
49
context : { } ,
50
50
} as unknown as H3Event ;
51
51
52
- expect ( handler ( event ) ) . resolves . toEqual ( {
52
+ await expect ( handler ( event ) ) . resolves . toEqual ( {
53
53
error : {
54
54
message : "[400] [IPX_MISSING_MODIFIERS] Modifiers are missing: " ,
55
55
} ,
56
56
} ) ;
57
57
} ) ;
58
58
59
- it ( "IPX_MISSING_ID" , ( ) => {
59
+ it ( "IPX_MISSING_ID" , async ( ) => {
60
60
const handler = createIPXH3Handler ( ipx ) ;
61
61
const event = {
62
62
path : "/path" ,
@@ -67,14 +67,14 @@ describe("server", () => {
67
67
context : { } ,
68
68
} as unknown as H3Event ;
69
69
70
- expect ( handler ( event ) ) . resolves . toEqual ( {
70
+ await expect ( handler ( event ) ) . resolves . toEqual ( {
71
71
error : {
72
72
message : "[400] [IPX_MISSING_ID] Resource id is missing: /path" ,
73
73
} ,
74
74
} ) ;
75
75
} ) ;
76
76
77
- it ( "[IPX_ERROR] ipx is not a function" , ( ) => {
77
+ it ( "[IPX_ERROR] ipx is not a function" , async ( ) => {
78
78
const handler = createIPXH3Handler ( ipx ) ;
79
79
const event = {
80
80
path : "/foo/bar/baz" ,
@@ -85,15 +85,15 @@ describe("server", () => {
85
85
context : { } ,
86
86
} as unknown as H3Event ;
87
87
88
- expect ( handler ( event ) ) . resolves . toEqual ( {
88
+ await expect ( handler ( event ) ) . resolves . toEqual ( {
89
89
error : {
90
90
message :
91
91
"[500] [IPX_ERROR] event.node.res.getHeader is not a function" ,
92
92
} ,
93
93
} ) ;
94
94
} ) ;
95
95
96
- it ( "createIPXH3Handler returns expected value" , ( ) => {
96
+ it ( "createIPXH3Handler returns expected value" , async ( ) => {
97
97
const handler = createIPXH3Handler ( ipx ) ;
98
98
const event = {
99
99
path : "/foo/bar/baz" ,
@@ -108,7 +108,7 @@ describe("server", () => {
108
108
context : { } ,
109
109
} as unknown as H3Event ;
110
110
111
- expect ( handler ( event ) ) . resolves . toEqual ( "data" ) ;
111
+ await expect ( handler ( event ) ) . resolves . toEqual ( "data" ) ;
112
112
} ) ;
113
113
} ) ;
114
114
0 commit comments