Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Different test groups per file #18

Open
IhsanMujdeci opened this issue Oct 6, 2020 · 3 comments
Open

Different test groups per file #18

IhsanMujdeci opened this issue Oct 6, 2020 · 3 comments
Labels
question Further information is requested

Comments

@IhsanMujdeci
Copy link

Can we please have diff test groups per file.
Like be able to define groups at different levels within the same file. Even if its at the describe level that would be good

test.test.ts

/**
* @group integration
*/
describe(()=>{})

/**
* @group unit
*/
describe(()=>{})
@eugene-manuilov
Copy link
Owner

@IhsanMujdeci unfortunately, it can't be done in the scope of this runner. Jest has two types of runners: one for finding test files and running it, another one for actual tests inside a file. This jest-runner-groups runner can work with files only and can't filter tests in a file.

@IhsanMujdeci
Copy link
Author

Could it be possible to extend the functionality, I see you use an underlying lib jest-docblock to check for the comments . Is it at all possible to go manually parse the file once detected by the dockblock or something?

@eugene-manuilov eugene-manuilov added the question Further information is requested label Jan 7, 2021
@eugene-manuilov
Copy link
Owner

Is it at all possible to go manually parse the file once detected by the dockblock or something?

Maybe... but it's definitely out of scope for this package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants