© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. IrvineBuild Your Own Test Frameworkhttps://doi.org/10.1007/978-1-4842-9247-1_13

13. Skipping Tests

Daniel Irvine1  
(1)
London, UK
 

This chapter contains an implementation for a new modifier function that is invaluable when using automated tests as part of your daily workflow: the ability to skip tests.

The idea is that the user can avoid a test being run (perhaps because they haven’t written it yet) by renaming it to it.skip. The same can be done for describe, which becomes describe.skip.

When the tests are reported, we’ll make this obvious to the user by using strikethrough text and a yellow question mark next to the test name.

Finally, we’ll add a modifier ...

Get Build Your Own Test Framework: A Practical Guide to Writing Better Automated Tests now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.