Skip to content

Commit 67512b2

Browse files
committed
squash: return the promise that is being tested
1 parent ad0c434 commit 67512b2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/integration/http_emitter_test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
5252
});
5353

5454
it("Sends a binary 1.0 CloudEvent by default", () => {
55-
emitter
55+
return emitter
5656
.send(event)
5757
.then((response: AxiosResponse) => {
5858
// A binary message will have a ce-id header
@@ -79,7 +79,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
7979
});
8080

8181
it("Sends a binary CloudEvent with Custom Headers", () => {
82-
emitter
82+
return emitter
8383
.send(event, { headers: { customheader: "value" } })
8484
.then((response: { data: { [k: string]: string } }) => {
8585
// A binary message will have a ce-id header
@@ -94,7 +94,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
9494
});
9595

9696
it("Sends a structured 1.0 CloudEvent if specified", () => {
97-
emitter
97+
return emitter
9898
.send(event, { protocol: Protocol.HTTPStructured })
9999
.then((response: { data: { [k: string]: string | Record<string, string>; data: { lunchBreak: string } } }) => {
100100
// A structured message will have a cloud event content type
@@ -124,7 +124,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
124124
return [201, returnBody];
125125
});
126126

127-
emitter
127+
return emitter
128128
.send(event, { protocol: Protocol.HTTPStructured, url: `${receiver}alternate` })
129129
.then((response: AxiosResponse) => {
130130
// A structured message will have a cloud event content type
@@ -153,7 +153,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
153153
});
154154

155155
it("Sends a binary 0.3 CloudEvent", () => {
156-
emitter
156+
return emitter
157157
.send(event)
158158
.then((response: AxiosResponse) => {
159159
// A binary message will have a ce-id header
@@ -179,7 +179,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
179179
});
180180

181181
it("Sends a structured 0.3 CloudEvent if specified", () => {
182-
emitter
182+
return emitter
183183
.send(event, { protocol: Protocol.HTTPStructured })
184184
.then(
185185
(response: {
@@ -213,7 +213,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
213213
return [201, returnBody];
214214
});
215215

216-
emitter
216+
return emitter
217217
.send(event, { protocol: Protocol.HTTPStructured, url: `${receiver}alternate` })
218218
.then(
219219
(response: {

0 commit comments

Comments
 (0)