@@ -23,7 +23,7 @@ const data = {
23
23
lunchBreak : "noon" ,
24
24
} ;
25
25
26
- const fixture = new CloudEvent ( {
26
+ export const fixture = new CloudEvent ( {
27
27
source,
28
28
type,
29
29
data,
@@ -107,7 +107,13 @@ function testEmitter(fn: TransportFunction, bodyAttr: string) {
107
107
} ) ;
108
108
}
109
109
110
- function assertBinary ( response : Record < string , string > ) {
110
+ /**
111
+ * Verify the received binary answer compare to the original fixture message
112
+ *
113
+ * @param {Record<string, Record<string, string>> } response received to compare to fixture
114
+ * @return {void } void
115
+ */
116
+ export function assertBinary ( response : Record < string , string > ) : void {
111
117
expect ( response . lunchBreak ) . to . equal ( data . lunchBreak ) ;
112
118
expect ( response [ "ce-type" ] ) . to . equal ( type ) ;
113
119
expect ( response [ "ce-source" ] ) . to . equal ( source ) ;
@@ -116,7 +122,13 @@ function assertBinary(response: Record<string, string>) {
116
122
expect ( response [ `ce-${ ext3Name } ` ] ) . to . deep . equal ( ext3Value ) ;
117
123
}
118
124
119
- function assertStructured ( response : Record < string , Record < string , string > > ) {
125
+ /**
126
+ * Verify the received structured answer compare to the original fixture message
127
+ *
128
+ * @param {Record<string, Record<string, string>> } response received to compare to fixture
129
+ * @return {void } void
130
+ */
131
+ export function assertStructured ( response : Record < string , Record < string , string > > ) : void {
120
132
expect ( response . data . lunchBreak ) . to . equal ( data . lunchBreak ) ;
121
133
expect ( response . type ) . to . equal ( type ) ;
122
134
expect ( response . source ) . to . equal ( source ) ;
0 commit comments