diff --git a/src/rules/__tests__/no-conditional-in-test.test.ts b/src/rules/__tests__/no-conditional-in-test.test.ts index 32b6aa86a..f133a7647 100644 --- a/src/rules/__tests__/no-conditional-in-test.test.ts +++ b/src/rules/__tests__/no-conditional-in-test.test.ts @@ -276,20 +276,6 @@ ruleTester.run('switch statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.skip('foo', () => { - switch('bar') {} - }) - `, - errors: [ - { - messageId: 'conditionalInTest', - column: 3, - line: 2, - }, - ], - }, { code: dedent` it.only('foo', () => { @@ -304,20 +290,6 @@ ruleTester.run('switch statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.only('foo', () => { - switch('bar') {} - }) - `, - errors: [ - { - messageId: 'conditionalInTest', - column: 3, - line: 2, - }, - ], - }, { code: dedent` xit('foo', () => { @@ -362,7 +334,7 @@ ruleTester.run('switch statements', rule, { }, { code: dedent` - test.concurrent.skip('foo', () => { + test.skip('foo', () => { switch('bar') {} }) `, @@ -376,7 +348,7 @@ ruleTester.run('switch statements', rule, { }, { code: dedent` - test.concurrent.only('foo', () => { + test.only('foo', () => { switch('bar') {} }) `, @@ -696,20 +668,6 @@ ruleTester.run('if statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.skip('foo', () => { - if ('bar') {} - }) - `, - errors: [ - { - messageId: 'conditionalInTest', - column: 3, - line: 2, - }, - ], - }, { code: dedent` it.only('foo', () => { @@ -724,20 +682,6 @@ ruleTester.run('if statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.only('foo', () => { - if ('bar') {} - }) - `, - errors: [ - { - messageId: 'conditionalInTest', - column: 3, - line: 2, - }, - ], - }, { code: dedent` xit('foo', () => { @@ -782,7 +726,7 @@ ruleTester.run('if statements', rule, { }, { code: dedent` - test.concurrent.skip('foo', () => { + test.skip('foo', () => { if ('bar') {} }) `, @@ -796,7 +740,7 @@ ruleTester.run('if statements', rule, { }, { code: dedent` - test.concurrent.only('foo', () => { + test.only('foo', () => { if ('bar') {} }) `, diff --git a/src/rules/__tests__/no-disabled-tests.test.ts b/src/rules/__tests__/no-disabled-tests.test.ts index e950c6eb2..5287aab1d 100644 --- a/src/rules/__tests__/no-disabled-tests.test.ts +++ b/src/rules/__tests__/no-disabled-tests.test.ts @@ -95,10 +95,6 @@ ruleTester.run('no-disabled-tests', rule, { code: 'it.skip("foo", function () {})', errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], }, - { - code: 'it.concurrent.skip("foo", function () {})', - errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], - }, { code: 'it["skip"]("foo", function () {})', errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], @@ -123,10 +119,6 @@ ruleTester.run('no-disabled-tests', rule, { code: 'test.skip.each([])("foo", function () {})', errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], }, - { - code: 'test.concurrent.skip("foo", function () {})', - errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], - }, { code: 'test["skip"]("foo", function () {})', errors: [{ messageId: 'disabledTest', column: 1, line: 1 }], diff --git a/src/rules/__tests__/no-focused-tests.test.ts b/src/rules/__tests__/no-focused-tests.test.ts index cad882f46..2e746b149 100644 --- a/src/rules/__tests__/no-focused-tests.test.ts +++ b/src/rules/__tests__/no-focused-tests.test.ts @@ -16,10 +16,8 @@ ruleTester.run('no-focused-tests', rule, { 'it()', 'describe.skip()', 'it.skip()', - 'it.concurrent.skip()', 'test()', 'test.skip()', - 'test.concurrent.skip()', 'var appliedOnly = describe.only; appliedOnly.apply(describe)', 'var calledOnly = it.only; calledOnly.call(it)', 'it.each()()', @@ -111,7 +109,7 @@ ruleTester.run('no-focused-tests', rule, { ], }, { - code: 'it.concurrent.only()', + code: 'it.concurrent.only.each``()', errors: [ { messageId: 'focusedTest', @@ -120,7 +118,7 @@ ruleTester.run('no-focused-tests', rule, { suggestions: [ { messageId: 'suggestRemoveFocus', - output: 'it.concurrent()', + output: 'it.concurrent.each``()', }, ], }, @@ -191,7 +189,7 @@ ruleTester.run('no-focused-tests', rule, { ], }, { - code: 'test.concurrent.only()', + code: 'test.concurrent.only.each()()', errors: [ { messageId: 'focusedTest', @@ -200,7 +198,7 @@ ruleTester.run('no-focused-tests', rule, { suggestions: [ { messageId: 'suggestRemoveFocus', - output: 'test.concurrent()', + output: 'test.concurrent.each()()', }, ], }, diff --git a/src/rules/__tests__/no-identical-title.test.ts b/src/rules/__tests__/no-identical-title.test.ts index ab8efd467..70321e36a 100644 --- a/src/rules/__tests__/no-identical-title.test.ts +++ b/src/rules/__tests__/no-identical-title.test.ts @@ -59,8 +59,8 @@ ruleTester.run('no-identical-title', rule, { test.only.concurrent('that', () => {}); `, dedent` - test.concurrent.only('this', () => {}); - test.concurrent.only('that', () => {}); + test.only('this', () => {}); + test.only('that', () => {}); `, dedent` describe('foo', () => { @@ -199,18 +199,11 @@ ruleTester.run('no-identical-title', rule, { }, { code: dedent` - test.concurrent.only('this', () => {}); + test.only('this', () => {}); test.concurrent('this', () => {}); `, errors: [{ messageId: 'multipleTestTitle', column: 17, line: 2 }], }, - { - code: dedent` - test.concurrent.only('this', () => {}); - test.concurrent.only('this', () => {}); - `, - errors: [{ messageId: 'multipleTestTitle', column: 22, line: 2 }], - }, { code: dedent` describe('foo', () => {}); diff --git a/src/rules/__tests__/no-if.test.ts b/src/rules/__tests__/no-if.test.ts index 54ecb26e1..786ace8e5 100644 --- a/src/rules/__tests__/no-if.test.ts +++ b/src/rules/__tests__/no-if.test.ts @@ -228,19 +228,6 @@ ruleTester.run('switch statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.skip('foo', () => { - switch('bar') {} - }) - `, - errors: [ - { - data: { condition: 'switch' }, - messageId: 'conditionalInTest', - }, - ], - }, { code: dedent` it.only('foo', () => { @@ -254,19 +241,6 @@ ruleTester.run('switch statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.only('foo', () => { - switch('bar') {} - }) - `, - errors: [ - { - data: { condition: 'switch' }, - messageId: 'conditionalInTest', - }, - ], - }, { code: dedent` xit('foo', () => { @@ -321,7 +295,7 @@ ruleTester.run('switch statements', rule, { }, { code: dedent` - test.concurrent.skip('foo', () => { + test.skip('foo', () => { switch('bar') {} }) `, @@ -334,7 +308,7 @@ ruleTester.run('switch statements', rule, { }, { code: dedent` - test.concurrent.only('foo', () => { + test.only('foo', () => { switch('bar') {} }) `, @@ -636,19 +610,6 @@ ruleTester.run('if statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.skip('foo', () => { - if('bar') {} - }) - `, - errors: [ - { - data: { condition: 'if' }, - messageId: 'conditionalInTest', - }, - ], - }, { code: dedent` it.only('foo', () => { @@ -662,19 +623,6 @@ ruleTester.run('if statements', rule, { }, ], }, - { - code: dedent` - it.concurrent.only('foo', () => { - if('bar') {} - }) - `, - errors: [ - { - data: { condition: 'if' }, - messageId: 'conditionalInTest', - }, - ], - }, { code: dedent` xit('foo', () => { @@ -729,7 +677,7 @@ ruleTester.run('if statements', rule, { }, { code: dedent` - test.concurrent.skip('foo', () => { + test.skip('foo', () => { if('bar') {} }) `, @@ -742,7 +690,7 @@ ruleTester.run('if statements', rule, { }, { code: dedent` - test.concurrent.only('foo', () => { + test.only('foo', () => { if('bar') {} }) `, diff --git a/src/rules/__tests__/no-test-prefixes.test.ts b/src/rules/__tests__/no-test-prefixes.test.ts index e2b0cd19d..b688c883a 100644 --- a/src/rules/__tests__/no-test-prefixes.test.ts +++ b/src/rules/__tests__/no-test-prefixes.test.ts @@ -18,19 +18,15 @@ ruleTester.run('no-test-prefixes', rule, { code: 'it.each``("foo", function () {})', parserOptions: { ecmaVersion: 6 }, }, - 'it.concurrent.only("foo", function () {})', 'test.only("foo", function () {})', 'test.each()("foo", function () {})', { code: 'test.each``("foo", function () {})', parserOptions: { ecmaVersion: 6 }, }, - 'test.concurrent.only("foo", function () {})', 'describe.skip("foo", function () {})', 'it.skip("foo", function () {})', - 'it.concurrent.skip("foo", function () {})', 'test.skip("foo", function () {})', - 'test.concurrent.skip("foo", function () {})', 'foo()', '[1,2,3].forEach()', ], diff --git a/src/rules/__tests__/valid-title.test.ts b/src/rules/__tests__/valid-title.test.ts index e97ba561a..038f325c8 100644 --- a/src/rules/__tests__/valid-title.test.ts +++ b/src/rules/__tests__/valid-title.test.ts @@ -612,17 +612,6 @@ ruleTester.run('title-must-be-string', rule, { }, ], }, - { - code: 'test.concurrent.skip(123, () => {});', - options: [{ ignoreTypeOfDescribeName: true }], - errors: [ - { - messageId: 'titleMustBeString', - column: 22, - line: 1, - }, - ], - }, { code: 'describe(String(/.+/), () => {});', errors: [ @@ -917,9 +906,9 @@ ruleTester.run('no-accidental-space', rule, { errors: [{ messageId: 'accidentalSpace', column: 5, line: 1 }], }, { - code: 'it.concurrent.skip(" foo", function () {})', - output: 'it.concurrent.skip("foo", function () {})', - errors: [{ messageId: 'accidentalSpace', column: 20, line: 1 }], + code: 'it.skip(" foo", function () {})', + output: 'it.skip("foo", function () {})', + errors: [{ messageId: 'accidentalSpace', column: 9, line: 1 }], }, { code: 'fit("foo ", function () {})', @@ -927,9 +916,9 @@ ruleTester.run('no-accidental-space', rule, { errors: [{ messageId: 'accidentalSpace', column: 5, line: 1 }], }, { - code: 'it.concurrent.skip("foo ", function () {})', - output: 'it.concurrent.skip("foo", function () {})', - errors: [{ messageId: 'accidentalSpace', column: 20, line: 1 }], + code: 'it.skip("foo ", function () {})', + output: 'it.skip("foo", function () {})', + errors: [{ messageId: 'accidentalSpace', column: 9, line: 1 }], }, { code: dedent` diff --git a/src/rules/no-if.ts b/src/rules/no-if.ts index 8700d75fd..dd651850b 100644 --- a/src/rules/no-if.ts +++ b/src/rules/no-if.ts @@ -11,13 +11,13 @@ import { const testCaseNames = new Set([ ...Object.keys(TestCaseName), 'it.only', - 'it.concurrent.only', + 'it.only', + 'it.skip', 'it.skip', - 'it.concurrent.skip', 'test.only', - 'test.concurrent.only', + 'test.only', + 'test.skip', 'test.skip', - 'test.concurrent.skip', 'fit.concurrent', ]); diff --git a/src/rules/utils/parseJestFnCall.ts b/src/rules/utils/parseJestFnCall.ts index 8bed175c8..b8462b8d0 100644 --- a/src/rules/utils/parseJestFnCall.ts +++ b/src/rules/utils/parseJestFnCall.ts @@ -134,12 +134,6 @@ const ValidJestFnCallChains = [ 'xtest', 'xtest.each', 'xtest.failing', - - // todo: check if actually valid (not in docs) - 'test.concurrent.skip', - 'test.concurrent.only', - 'it.concurrent.skip', - 'it.concurrent.only', ]; export const parseJestFnCall = (