test: enable a few jest eslint rules (#6900)

* test: enable a few jest eslint rules

* more
This commit is contained in:
Joshua Chen 2022-03-12 08:43:09 +08:00 committed by GitHub
parent 1efc6c6091
commit aa5a2d4c04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 3644 additions and 3478 deletions

View file

@ -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,