4 ms·
Something I've built for myself a couple times is the ability to decorate a test with a ticket number so that the test is expected to pass if an environment var
by dllthomas 4y ago
Something I've built for myself a couple times is the ability to decorate a test with a ticket number so that the test is expected to pass if an environment variable (usually TICKET) is set to that number, and otherwise is expected to fail.
I also sometimes include a stricter version that includes a test for the current behavior, on the theory that someone changing the current behavior might be in a good position to fix the ticket.
- masklinn 4y ago> Something I've built for myself a couple times is the ability to decorate a test with a ticket number so that the test is expected to pass if an environment variable (usually TICKET) is set to that number, and otherwise is expected to fail. I don't understand that use case. Do you mean that if you set the envvar, the test now becomes "normal" because the assumption is you're trying to fix the ticket, and thus make the test pass? I guess that makes sense if your workflow is to "clock in" on tickets, to which you can hook env updates?
- dllthomas 4y agoYou have it right, although "clock in" sounds a little formal; I'd probably just say "start work".