You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
So, I've been digging into test coverage for a half-dozen packages, and would like to suggest a very needed feature: if Gagarin doesn't find an expect() statement to parse, it shouldn't return a green success in the test runner. Preferably, it should return yellow or undefined. I'm finding that it's quite common to write a test, think that it's passing, only to discover that the I wasn't in the correct scope, and Gagarin hadn't run the tests at all. I have a few other ideas that could make Gagarin more usable; but that's the really critical one that is going to frustrate people, I think.
Just my $0.02.
The text was updated successfully, but these errors were encountered:
I was thinking a little how to implement this and it feels like it may not be trivial to do so. Consider the following example:
it('a not-so-obvious test case',function(){if(someCondition){expect(someValue).to.fulfill.some.condition;}});
Would you consider this a valid test case? One one hand it's correct because it contains assertion. On the other hand, the assertion may not be executed if someCondition fails. So there's a dilemma if we should apporach this problem by looking at the syntax only, or by veryfying if the assertion function was called at least once.
Hi!
So, I've been digging into test coverage for a half-dozen packages, and would like to suggest a very needed feature: if Gagarin doesn't find an
expect()
statement to parse, it shouldn't return a green success in the test runner. Preferably, it should return yellow or undefined. I'm finding that it's quite common to write a test, think that it's passing, only to discover that the I wasn't in the correct scope, and Gagarin hadn't run the tests at all. I have a few other ideas that could make Gagarin more usable; but that's the really critical one that is going to frustrate people, I think.Just my $0.02.
The text was updated successfully, but these errors were encountered: