mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 10:37:51 +02:00
test: enable a few jest eslint rules (#6900)
* test: enable a few jest eslint rules * more
This commit is contained in:
parent
1efc6c6091
commit
aa5a2d4c04
155 changed files with 3644 additions and 3478 deletions
|
@ -19,14 +19,14 @@ function getOutputCss(output) {
|
|||
}
|
||||
|
||||
function testStylelintRule(config, tests) {
|
||||
describe(tests.ruleName, () => {
|
||||
describe(`${tests.ruleName}`, () => {
|
||||
const checkTestCaseContent = (testCase) =>
|
||||
testCase.description || testCase.code || 'no description';
|
||||
|
||||
if (tests.accept && tests.accept.length) {
|
||||
describe('accept cases', () => {
|
||||
tests.accept.forEach((testCase) => {
|
||||
test(checkTestCaseContent(testCase), async () => {
|
||||
it(`${checkTestCaseContent(testCase)}`, async () => {
|
||||
const options = {
|
||||
code: testCase.code,
|
||||
config,
|
||||
|
@ -49,7 +49,7 @@ function testStylelintRule(config, tests) {
|
|||
if (tests.reject && tests.reject.length) {
|
||||
describe('reject cases', () => {
|
||||
tests.reject.forEach((testCase) => {
|
||||
test(checkTestCaseContent(testCase), async () => {
|
||||
it(`${checkTestCaseContent(testCase)}`, async () => {
|
||||
const options = {
|
||||
code: testCase.code,
|
||||
config,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue