feat: add async suffix eslint rule (#485)

This commit is contained in:
Manuel authored and GitHub committed 2024-05-18 12:25:33 +02:00
1 parent 5723295856
commit dcaff1d91c
60 files changed
+296 -225

No files matched your search

@@ -9,7 +9,10 @@ import { throwIfActionForbiddenAsync } from "../../board/board-access";
const defaultCreatorId = createId();
const expectActToBe = async (act: () => Promise<void>, success: boolean) => {
const expectActToBeAsync = async (
act: () => Promise<void>,
success: boolean,
) => {
if (!success) {
await expect(act()).rejects.toThrow("Board not found");
return;
@@ -55,7 +58,7 @@ describe("throwIfActionForbiddenAsync should check access to board and return bo
);
// Assert
await expectActToBe(act, expectedResult);
await expectActToBeAsync(act, expectedResult);
},
);
@@ -92,7 +95,7 @@ describe("throwIfActionForbiddenAsync should check access to board and return bo
);
// Assert
await expectActToBe(act, expectedResult);
await expectActToBeAsync(act, expectedResult);
},
);
@@ -129,7 +132,7 @@ describe("throwIfActionForbiddenAsync should check access to board and return bo
);
// Assert
await expectActToBe(act, expectedResult);
await expectActToBeAsync(act, expectedResult);
},
);
@@ -166,7 +169,7 @@ describe("throwIfActionForbiddenAsync should check access to board and return bo
);
// Assert
await expectActToBe(act, expectedResult);
await expectActToBeAsync(act, expectedResult);
},
);