How to setup Test Explorer ui for Karma (angular)
jasmine - Run angular Karma tests in visual studio code - Stack Overflow
Karma Test Explorer - New, feature rich, Visual Studio Code extension for Angular and Karma testing
Karma Test Explorer - New, feature rich, Visual Studio Code extension for Angular and Karma testing
Videos
Karma Test Explorer is a new, feature rich, Visual Studio Code extension for Angular and Karma testing. It is a major rewrite of the popular (but now deprecated) Angular/Karma Test Explorer extension, and brings numerous significant enhancements and new features.
-
Shows Angular and Karma tests in a visual test explorer in VS Code
-
Adds code lenses to the test files to easily run individual tests or suites
-
Adds gutter decorations to test files to show the status of each test
-
Shows test failure details inline within the code at the point of each failure
-
Supports Jasmine and Mocha test frameworks
-
Supports remote development scenarios with Dev Containers
-
Supports multi-root and multi-project Angular workspace
-
Watch mode support with auto pass / fail test status update
-
Duplicate test detection and reporting
-
Supports headless and non-headless testing to run tests in visible browser window
-
Smooth user experience to "just work" without any or much configuration
-
Test filtering support to show only focused tests or exclude disabled tests
-
Group and run tests by folder or by test suite
-
And more
Karma Test Explorer is a new, feature rich, Visual Studio Code extension for Angular and Karma testing. It is a major rewrite of the popular (but now deprecated) Angular/Karma Test Explorer extension, and brings numerous significant enhancements and new features.
Shows Angular and Karma tests in a visual test explorer in VS Code
Adds code lenses to the test files to easily run individual tests or suites
Adds gutter decorations to test files to show the status of each test
Shows test failure details inline within the code at the point of each failure
Supports Jasmine and Mocha test frameworks
Supports remote development scenarios with Dev Containers
Supports multi-root and multi-project Angular workspace
Watch mode support with auto pass / fail test status update
Duplicate test detection and reporting
Supports headless and non-headless testing to run tests in visible browser window
Smooth user experience to "just work" without any or much configuration
Test filtering support to show only focused tests or exclude disabled tests
Group and run tests by folder or by test suite
And more
If you are using the Karma/Jasmine stack, use:
fdescribe("when ...", function () { // to [f]ocus on a single group of tests
fit("should ...", function () {...}); // to [f]ocus on a single test case
});
... and:
xdescribe("when ...", function () { // to e[x]clude a group of tests
xit("should ...", function () {...}); // to e[x]clude a test case
});
When you're on Karma/Mocha:
describe.only("when ...", function () { // to run [only] this group of tests
it.only("should ...", function () {...}); // to run [only] this test case
});
... and:
describe.skip("when ...", function () { // to [skip] running this group of tests
it.skip("should ...", function () {...}); // to [skip] running this test case
});
Update: karma has changed.
Now use fit() and fdescribe()
f stands for focused!