Skip to content

Conversation

@OlehBabenkoo
Copy link
Contributor

This feature adds support for the .only annotation in describe and test constructs. It allows running only the selected describe blocks or individual test cases, greatly simplifying the debugging and testing process by focusing on specific parts.

Key Changes:

  1. Support for describe.only:

    • Added functionality to use describe.only to execute only a specific describe block.
    • All other describe blocks will be skipped.
    describe.only("This block will run", () => {
        test("Test in this block will also run", () => {
            expect(1).toBeEqual(1)
        })
    })
  2. Support for test.only:

    • Added functionality to use test.only to execute a specific test within any describe block.
    • All other test cases in the same or other describe blocks will be skipped.
    describe("Test block", () => {
        test.only("This test will run", () => {
            expect(3).toBeGreaterThan(2)
        })
        test("This test will be skipped", () => {
            expect(true).toBeTruthy()
        })
    })

@OlehBabenkoo OlehBabenkoo marked this pull request as ready for review June 30, 2025 08:44
@VadimNastoyashchy VadimNastoyashchy added the enhancement New feature or request label Jun 30, 2025
@VadimNastoyashchy VadimNastoyashchy self-requested a review June 30, 2025 08:55
@VadimNastoyashchy VadimNastoyashchy changed the base branch from master to release/1.11.0 June 30, 2025 09:01
@VadimNastoyashchy VadimNastoyashchy merged commit 56332be into scripterio-js:release/1.11.0 Jun 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants