Skip to content

Comments between @params do not get run #311

@luis-j-soares

Description

@luis-j-soares
@suite
class MyTests

    ' ++++++++++++++++++++++++
    @describe("my test suite")
    ' ++++++++++++++++++++++++

    @it("does something")
    @params("abc") ' a comment describing the param case
    @params("def") ' another comment describing this thing right here
    @params("ghi") ' another comment!
    function _(param as string)
        (...)
    end function

end class

This will result in an empty getTestSuiteData:

instance.getTestSuiteData = function()
    return {
        name: "MyTests"
        isSolo: false
        noCatch: false
        isIgnored: false
        isAsync: false
        pkgPath: "source/app/MyUnit.spec.bs"
        filePath: "/Users/lse16/dev/brighterscript-test-bench/src/common/source/app/MyUnit.spec.bs"
        lineNumber: 49
        valid: true
        hasFailures: false
        hasSoloTests: false
        hasIgnoredTests: false
        hasSoloGroups: false
        setupFunctionName: ""
        tearDownFunctionName: ""
        beforeEachFunctionName: ""
        afterEachFunctionName: ""
        isNodeTest: false
        isAsync: false
        asyncTimeout: 60000
        nodeName: ""
        generatedNodeName: "MyTests"
        testGroups: [
            {
                name: "my test suite"
                isSolo: false
                isIgnored: false
                isAsync: false
                filename: "source/app/MyUnit.spec.bs"
                lineNumber: "52"
                setupFunctionName: ""
                tearDownFunctionName: ""
                beforeEachFunctionName: ""
                afterEachFunctionName: ""
                testCases: []
            }
        ]
    }
end function

I assume this is because the annotations are getting attached to the CommentStatement nodes.

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