diff --git a/test/integration/emitter_factory_test.ts b/test/integration/emitter_factory_test.ts index 7d9baa1..31b2e29 100644 --- a/test/integration/emitter_factory_test.ts +++ b/test/integration/emitter_factory_test.ts @@ -23,7 +23,7 @@ const data = { lunchBreak: "noon", }; -const fixture = new CloudEvent({ +export const fixture = new CloudEvent({ source, type, data, @@ -107,7 +107,13 @@ function testEmitter(fn: TransportFunction, bodyAttr: string) { }); } -function assertBinary(response: Record) { +/** + * Verify the received binary answer compare to the original fixture message + * + * @param {Record>} response received to compare to fixture + * @return {void} void + */ +export function assertBinary(response: Record): void { expect(response.lunchBreak).to.equal(data.lunchBreak); expect(response["ce-type"]).to.equal(type); expect(response["ce-source"]).to.equal(source); @@ -116,7 +122,13 @@ function assertBinary(response: Record) { expect(response[`ce-${ext3Name}`]).to.deep.equal(ext3Value); } -function assertStructured(response: Record>) { +/** + * Verify the received structured answer compare to the original fixture message + * + * @param {Record>} response received to compare to fixture + * @return {void} void + */ +export function assertStructured(response: Record>): void { expect(response.data.lunchBreak).to.equal(data.lunchBreak); expect(response.type).to.equal(type); expect(response.source).to.equal(source);