Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments between @params do not get run #311

Open
luis-j-soares opened this issue Feb 4, 2025 · 0 comments
Open

Comments between @params do not get run #311

luis-j-soares opened this issue Feb 4, 2025 · 0 comments

Comments

@luis-j-soares
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant