Skip to content

Commit a49fe70

Browse files
committed
squash: fix linting issues
Signed-off-by: Lucas Holmquist <[email protected]>
1 parent 67512b2 commit a49fe70

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

test/integration/http_emitter_test.ts

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
5151
[ext3Name]: ext3Value,
5252
});
5353

54-
it("Sends a binary 1.0 CloudEvent by default", () => {
55-
return emitter
54+
it("Sends a binary 1.0 CloudEvent by default", () =>
55+
emitter
5656
.send(event)
5757
.then((response: AxiosResponse) => {
5858
// A binary message will have a ce-id header
@@ -66,8 +66,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
6666
expect(response.data[`${CONSTANTS.EXTENSIONS_PREFIX}${ext2Name}`]).to.equal(ext2Value);
6767
expect(response.data[`${CONSTANTS.EXTENSIONS_PREFIX}${ext3Name}`].value).to.equal(ext3Value.value);
6868
})
69-
.catch(expect.fail);
70-
});
69+
.catch(expect.fail));
7170

7271
it("Provides the HTTP headers for a binary event", () => {
7372
const headers = headersFor(event);
@@ -78,8 +77,8 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
7877
expect(headers[CONSTANTS.CE_HEADERS.TIME]).to.equal(event.time);
7978
});
8079

81-
it("Sends a binary CloudEvent with Custom Headers", () => {
82-
return emitter
80+
it("Sends a binary CloudEvent with Custom Headers", () =>
81+
emitter
8382
.send(event, { headers: { customheader: "value" } })
8483
.then((response: { data: { [k: string]: string } }) => {
8584
// A binary message will have a ce-id header
@@ -90,11 +89,10 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
9089
// A binary message will have a request body for the data
9190
expect(response.data.lunchBreak).to.equal(data.lunchBreak);
9291
})
93-
.catch(expect.fail);
94-
});
92+
.catch(expect.fail));
9593

96-
it("Sends a structured 1.0 CloudEvent if specified", () => {
97-
return emitter
94+
it("Sends a structured 1.0 CloudEvent if specified", () =>
95+
emitter
9896
.send(event, { protocol: Protocol.HTTPStructured })
9997
.then((response: { data: { [k: string]: string | Record<string, string>; data: { lunchBreak: string } } }) => {
10098
// A structured message will have a cloud event content type
@@ -108,8 +106,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
108106
expect(response.data[ext1Name]).to.equal(ext1Value);
109107
expect(response.data[ext2Name]).to.equal(ext2Value);
110108
})
111-
.catch(expect.fail);
112-
});
109+
.catch(expect.fail));
113110

114111
it("Sends to an alternate URL if specified", () => {
115112
nock(receiver)
@@ -152,8 +149,8 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
152149
[ext3Name]: ext3Value,
153150
});
154151

155-
it("Sends a binary 0.3 CloudEvent", () => {
156-
return emitter
152+
it("Sends a binary 0.3 CloudEvent", () =>
153+
emitter
157154
.send(event)
158155
.then((response: AxiosResponse) => {
159156
// A binary message will have a ce-id header
@@ -166,8 +163,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
166163
expect(response.data[`${CONSTANTS.EXTENSIONS_PREFIX}${ext2Name}`]).to.equal(ext2Value);
167164
expect(response.data[`${CONSTANTS.EXTENSIONS_PREFIX}${ext3Name}`].value).to.equal(ext3Value.value);
168165
})
169-
.catch(expect.fail);
170-
});
166+
.catch(expect.fail));
171167

172168
it("Provides the HTTP headers for a binary event", () => {
173169
const headers = headersFor(event);
@@ -178,8 +174,8 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
178174
expect(headers[CONSTANTS.CE_HEADERS.TIME]).to.equal(event.time);
179175
});
180176

181-
it("Sends a structured 0.3 CloudEvent if specified", () => {
182-
return emitter
177+
it("Sends a structured 0.3 CloudEvent if specified", () =>
178+
emitter
183179
.send(event, { protocol: Protocol.HTTPStructured })
184180
.then(
185181
(response: {
@@ -197,8 +193,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
197193
expect(response.data[ext2Name]).to.equal(ext2Value);
198194
},
199195
)
200-
.catch(expect.fail);
201-
});
196+
.catch(expect.fail));
202197

203198
it("Sends to an alternate URL if specified", () => {
204199
nock(receiver)

0 commit comments

Comments
 (0)