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
Other testing frameworks have an inconclusive() result type which is useful in the scenarios listed in the next section.
Feature Details:
Add to expect method .toBeInconclusive(reason) (where reason is a string containing why) which should be emitted as part of testing.
My .02 is that reason should be a required field e.g. not Falsy or nil
This method would only be triggered if expect(expression) evaluates to False e.g., test is not run-able
In test summaries, include the count of inconclusive along with Pass, Fail
In theory inconclusive tests would not contribute to code coverage, although, that is an area to consider
Motivation
Inconclusive scenarios:
Partially completed tests created as part of TDD (etc.)
Unable to meet test preconditions due to hardware/environment issues (test might pass otherwise)
Example
// UC 1:expect(false).toBeInconclusive('Test not finished');// UC 2: Test is un-run-able// Fetch the number of CPU CoresconstnumCores=require('os').cpus().length??0;// If evaluation is false, the test is inconclusiveexpect(numCores<2).toBeInconclusive('At least two CPU cores are required');
Pitch
It brings jest compatible with other platforms
It provides useful functionality for development teams
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
Other testing frameworks have an inconclusive() result type which is useful in the scenarios listed in the next section.
Feature Details:
Add to
expect
method.toBeInconclusive(reason)
(wherereason
is a string containing why) which should be emitted as part of testing.reason
should be a required field e.g. not Falsy ornil
expect(expression)
evaluates to False e.g., test is not run-ableIn test summaries, include the count of inconclusive along with Pass, Fail
In theory inconclusive tests would not contribute to code coverage, although, that is an area to consider
Motivation
Inconclusive scenarios:
Example
Pitch
The text was updated successfully, but these errors were encountered: