Skip to content

Commit b01b06d

Browse files
committed
test: move function calls inside catch
1 parent ee42211 commit b01b06d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/middleware-flexible-checksums/src/middleware-flexible-checksums.integ.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ describe("middleware-flexible-checksums", () => {
145145
Key: "k",
146146
Body: "hello",
147147
})
148-
.catch((err) => {
148+
.catch(() => {
149149
// Expected, since we're faking transient error which is retried.
150+
// Validate that flexibleChecksumsMiddleware is called once.
151+
expect(flexChecksCalls).toEqual(1);
152+
// Validate that retryMiddleware is called maxAttempts times.
153+
expect(retryMiddlewareCalls).toEqual(maxAttempts);
150154
});
151-
152-
// Validate that flexibleChecksumsMiddleware is called once.
153-
expect(flexChecksCalls).toEqual(1);
154-
// Validate that retryMiddleware is called maxAttempts times.
155-
expect(retryMiddlewareCalls).toEqual(maxAttempts);
155+
expect.hasAssertions();
156156
});
157157
});
158158

0 commit comments

Comments
 (0)