diff --git a/samples/basic/test/add.test.ts b/samples/basic/test/add.test.ts index d497162..92a6850 100644 --- a/samples/basic/test/add.test.ts +++ b/samples/basic/test/add.test.ts @@ -1,6 +1,13 @@ import { describe, expect, it } from 'vitest' import { add } from '../src/add' +const skip = true +describe.runIf(skip).concurrent('runIf', () => { + it.skipIf(skip)('test case', () => { + + }) +}) + describe('addition', () => { describe('test suit', () => { it('add', () => { diff --git a/src/pure/parsers/babel_parser.ts b/src/pure/parsers/babel_parser.ts index c0eccb8..4397dfb 100644 --- a/src/pure/parsers/babel_parser.ts +++ b/src/pure/parsers/babel_parser.ts @@ -128,6 +128,8 @@ export const parse = ( || deepGet(rootCallee, 'object').name // handle cases where it's part of a tag (e.g. .each`table`) || deepGet(rootCallee, 'tag', 'object').name + // handle cases like .skipIf(true).concurrent + || deepGet(rootCallee, 'object', 'callee', 'object').name return [name, property] } diff --git a/test/parse.test.ts b/test/parse.test.ts index cefb774..a6951b2 100644 --- a/test/parse.test.ts +++ b/test/parse.test.ts @@ -18,6 +18,17 @@ describe('parse', () => { expect(out.itBlocks.length).toBe(1) }) + it('parse skipIf with concurrent #36', () => { + const out = parse( + 'x.js', + '' + + 'describe.skipIf(true).concurrent(`test`, () => {\n' + + '}); \n', + ) + + expect(out.describeBlocks.length).toBe(1) + }) + it('parse decorator', () => { const out = parse( 'x.ts',