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

@ -22,7 +22,7 @@ function testValidateThemeConfig(themeConfig) {
}
describe('validateThemeConfig', () => {
test('undefined config', () => {
it('undefined config', () => {
const liveCodeBlock = undefined;
expect(testValidateThemeConfig({liveCodeBlock})).toEqual({
liveCodeBlock: {
@ -31,7 +31,7 @@ describe('validateThemeConfig', () => {
});
});
test('unexist config', () => {
it('unexist config', () => {
expect(testValidateThemeConfig({})).toEqual({
liveCodeBlock: {
...DEFAULT_CONFIG,
@ -39,7 +39,7 @@ describe('validateThemeConfig', () => {
});
});
test('empty config', () => {
it('empty config', () => {
const liveCodeBlock = {};
expect(testValidateThemeConfig({liveCodeBlock})).toEqual({
liveCodeBlock: {
@ -48,7 +48,7 @@ describe('validateThemeConfig', () => {
});
});
test('playgroundPosition top', () => {
it('playgroundPosition top', () => {
const liveCodeBlock = {
playgroundPosition: 'top',
};
@ -60,7 +60,7 @@ describe('validateThemeConfig', () => {
});
});
test('playgroundPosition bottom', () => {
it('playgroundPosition bottom', () => {
const liveCodeBlock = {
playgroundPosition: 'bottom',
};
@ -72,7 +72,7 @@ describe('validateThemeConfig', () => {
});
});
test('playgroundPosition invalid string', () => {
it('playgroundPosition invalid string', () => {
const liveCodeBlock = {playgroundPosition: 'invalid'};
expect(() =>
testValidateThemeConfig({liveCodeBlock}),
@ -80,7 +80,7 @@ describe('validateThemeConfig', () => {
`"\\"liveCodeBlock.playgroundPosition\\" must be one of [top, bottom]"`,
);
});
test('playgroundPosition invalid boolean', () => {
it('playgroundPosition invalid boolean', () => {
const liveCodeBlock = {playgroundPosition: true};
expect(() =>
testValidateThemeConfig({liveCodeBlock}),