-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ use
@vitest/eslint-plugin
for vitest
- Loading branch information
1 parent
496fe8e
commit a5e1a59
Showing
9 changed files
with
538 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
import { ALLOWED_VITEST_FUNCS } from "../constants"; | ||
import { testingConfig } from "./testing"; | ||
|
||
describe("testingConfig", () => { | ||
it("should create default config w/ vitest overrides", async () => { | ||
it("should create default config w/ vitest", async () => { | ||
const [vitest] = await testingConfig({}, false); | ||
|
||
expect(vitest?.rules).toStrictEqual( | ||
expect.objectContaining({ | ||
"jest/no-deprecated-functions": "off", | ||
"jest/require-hook": [ | ||
"error", | ||
{ | ||
allowedFunctionCalls: ALLOWED_VITEST_FUNCS, | ||
}, | ||
], | ||
}), | ||
); | ||
expect(vitest?.name).toBe("jimmy.codes/vitest"); | ||
}); | ||
|
||
it("should create default config w/o vitest overrides", async () => { | ||
it("should create default config w/ jest", async () => { | ||
const [jest] = await testingConfig({ framework: "jest" }, false); | ||
|
||
expect(jest?.rules).toStrictEqual( | ||
expect.not.objectContaining({ | ||
"jest/no-deprecated-functions": "off", | ||
"jest/require-hook": [ | ||
"error", | ||
{ | ||
allowedFunctionCalls: ALLOWED_VITEST_FUNCS, | ||
}, | ||
], | ||
}), | ||
); | ||
expect(jest?.name).toBe("jimmy.codes/jest"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.