Skip to content

Tests inside extensions are not nested correctly in documentText/tests and workspace/tests responses #1218

Closed
@plemarquand

Description

@plemarquand

Requests to documentText/tests and workspace/tests should generate two TestItems inside a top level MyTests TestItem with the following code.

final class MyTests: XCTestCase {
    func test1() {
    }
}

extension MyTests {
    func test2() {
    }
}

Expected:

- MyTests
  - test1()
  - test2()

Actual:

- MyTests
  - test1()
- test2()

This is the root issue for swiftlang/vscode-swift#778.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions