mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
chore: enable eslint-plugin-jest (#6375)
This commit is contained in:
parent
3e5944ef1f
commit
52db7320a6
32 changed files with 194 additions and 193 deletions
|
@ -41,6 +41,7 @@ function testField(params: {
|
|||
params.invalidFrontMatters?.forEach(([frontMatter, message]) => {
|
||||
try {
|
||||
validateDocFrontMatter(frontMatter);
|
||||
// eslint-disable-next-line jest/no-jasmine-globals
|
||||
fail(
|
||||
new Error(
|
||||
`Doc frontmatter is expected to be rejected, but was accepted successfully:\n ${JSON.stringify(
|
||||
|
@ -51,6 +52,7 @@ function testField(params: {
|
|||
),
|
||||
);
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(e.message).toMatch(new RegExp(escapeStringRegexp(message)));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue