I am using Visual Studio code, Protractor, Typescript and Jasmine framework. I have spec test cases within "it" block.
To see all the test cases or it blocks I have installed "Jasmine Test Explorer " and "Jasmine Explorer UI" but somehow test cases are not listed.
Could you please help me to resolve this.
If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.
Here is a possible solution:
Create a setting pointing to your config file (e.g. in .vscode/settings.json
):
{
"jasmineExplorer.config": "jasmine.json",
...
}
In the jasmine.json
file, you tell the explorer where the specifications are. Here is an example:
{
"spec_dir": "site/dist/tests",
"spec_files": ["**/*[sS]pec.js"],
"helpers": ["helpers/**/*.js"],
"random": false,
"seed": null,
"stopSpecOnExpectationFailure": false
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With