Skip to content

Commit c89c649

Browse files
fix: allow any variations of expect (#108)
1 parent 7bd9cca commit c89c649

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

configs/jest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function getJestRecommendedConfig() {
3131

3232
"jest/consistent-test-it": "error",
3333

34-
"jest/expect-expect": "error",
34+
"jest/expect-expect": ["error", { assertFunctionNames: ["expect*"] }],
3535

3636
// No need
3737
// "jest/max-expects": "error",

validation/code.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* @jest-environment jsdom
33
*/
44

5+
function expectSomething() {
6+
expect(1).toBe(1);
7+
}
8+
59
describe("name", () => {
610
it("test #1", () => {
711
const data = { type: "coords", x: 1, y: 2 };
@@ -19,4 +23,8 @@ describe("name", () => {
1923
expect(data.type).toBe(type);
2024
expect(data.y).toBe(coords.y);
2125
});
26+
27+
it("test #3", () => {
28+
expectSomething();
29+
});
2230
});

0 commit comments

Comments
 (0)