@@ -24,7 +24,7 @@ describe('Parser', () => {
24
24
} ) ;
25
25
const JSONPayload = { name : 'John' , age : 18 } ;
26
26
27
- it ( 'parses an event with schema and envelope' , async ( ) => {
27
+ it ( 'parses an event with schema and envelope' , ( ) => {
28
28
// Prepare
29
29
const event = structuredClone ( baseSqsEvent ) ;
30
30
event . Records [ 1 ] . body = 'bar' ;
@@ -37,15 +37,15 @@ describe('Parser', () => {
37
37
expect ( result ) . toStrictEqual ( [ 'Test message.' , 'bar' ] ) ;
38
38
} ) ;
39
39
40
- it ( 'throws when envelope does not match' , async ( ) => {
40
+ it ( 'throws when envelope does not match' , ( ) => {
41
41
// Prepare
42
42
const event = structuredClone ( baseEventBridgeEvent ) ;
43
43
44
44
// Act & Assess
45
45
expect ( ( ) => parse ( event , SqsEnvelope , z . string ( ) ) ) . toThrow ( ) ;
46
46
} ) ;
47
47
48
- it ( 'throws when schema does not match' , async ( ) => {
48
+ it ( 'throws when schema does not match' , ( ) => {
49
49
// Prepare
50
50
const event = structuredClone ( baseSqsEvent ) ;
51
51
// @ts -expect-error - setting an invalid body
@@ -55,7 +55,7 @@ describe('Parser', () => {
55
55
expect ( ( ) => parse ( event , SqsEnvelope , z . string ( ) ) ) . toThrow ( ) ;
56
56
} ) ;
57
57
58
- it ( 'parses the event successfully' , async ( ) => {
58
+ it ( 'parses the event successfully' , ( ) => {
59
59
// Prepare
60
60
const event = 42 ;
61
61
@@ -66,15 +66,15 @@ describe('Parser', () => {
66
66
expect ( result ) . toEqual ( event ) ;
67
67
} ) ;
68
68
69
- it ( 'throws when the event does not match the schema' , async ( ) => {
69
+ it ( 'throws when the event does not match the schema' , ( ) => {
70
70
// Prepare
71
71
const event = structuredClone ( JSONPayload ) ;
72
72
73
73
// Act & Assess
74
74
expect ( ( ) => parse ( event , undefined , z . number ( ) ) ) . toThrow ( ) ;
75
75
} ) ;
76
76
77
- it ( 'returns the payload when using safeParse' , async ( ) => {
77
+ it ( 'returns the payload when using safeParse' , ( ) => {
78
78
// Prepare
79
79
const event = structuredClone ( JSONPayload ) ;
80
80
@@ -88,7 +88,7 @@ describe('Parser', () => {
88
88
} ) ;
89
89
} ) ;
90
90
91
- it ( 'returns the error when using safeParse and the payload is invalid' , async ( ) => {
91
+ it ( 'returns the error when using safeParse and the payload is invalid' , ( ) => {
92
92
// Prepare
93
93
const event = structuredClone ( JSONPayload ) ;
94
94
@@ -103,7 +103,7 @@ describe('Parser', () => {
103
103
} ) ;
104
104
} ) ;
105
105
106
- it ( 'returns the payload when using safeParse with envelope' , async ( ) => {
106
+ it ( 'returns the payload when using safeParse with envelope' , ( ) => {
107
107
// Prepare
108
108
const detail = structuredClone ( JSONPayload ) ;
109
109
const event = structuredClone ( baseEventBridgeEvent ) ;
@@ -119,7 +119,7 @@ describe('Parser', () => {
119
119
} ) ;
120
120
} ) ;
121
121
122
- it ( 'returns an error when using safeParse with envelope and the payload is invalid' , async ( ) => {
122
+ it ( 'returns an error when using safeParse with envelope and the payload is invalid' , ( ) => {
123
123
// Prepare
124
124
const event = structuredClone ( baseEventBridgeEvent ) ;
125
125
0 commit comments