It would be unusual to have a unit test in the expected state. Unit tests can check for positive conditions ("expect x to be 2 ") or negative conditions ("wait for save to throw an exception if name is null "), and can be marked as not (if the function is waiting, and you donβt want to to noise in the test output). But what you seem to be asking is a way to nullify a function test while you work on it. This contradicts the tenants of Test Driven Development.
In TDD, you need to write tests that accurately describe what a function should do. If this function has not yet been written, then, by definition, these tests will and should fail. Then you implement the function until all these tests pass one by one. You want all tests to start with an error, and then proceed to transfer. This is, as you know, when your function is complete.
Think about how it would look if you could mark unsuccessful tests as passing, as you suggest: all tests will pass, and everything will look complete if the function does not work. Then, once you are done and the function works as expected, all of a sudden your tests will fail until you log in and untie them. Besides being a weird way of working, this workflow will be very prone to errors and false positives.
jemmons
source share