I have some unit test that should not be run, as of now, is there a way I can skip them? Other than using fdescribe on the ones I want to run.
Testing is absolutely necessary to ensure your Angular app is maintainable. Check out the documentation for testing Angular apps for more information.
Excluding Tests / Specs If you want to exclude a specific test, simply use xit() instead of it() . The x means exclude. describe('description', function () { xit('description', function () {}); }); If you want to exclude an entire describe block, use xdescribe() instead of describe() .
There are a lot of different types of automated software testing. If you're familiar with the test automation pyramid, then you know unit testing is the type of testing you should probably focus most of your efforts on. This is true regardless of programming language, and TypeScript is certainly no exception.
Jasmine is the default test framework used with Angular. It ships with Angular CLI by default. With such low friction required to use it, it's not surprising so many people adopt it.
If you're looking to skip tests, it's 'x' in front of describe() or it():
xdescribe('some test', () => { });
And maybe just skip a test in a block:
describe('some other test', () => {
xit('skip this test', () => { });
});
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