Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var results = where(function () {
/***
leftInput | b | andTheAnswerIs
1000 | 1000 | 1000
12 | 24 | 24
451 | 2 | 4451
4 | 8 | 7
***/
tape.equal(Math.max(leftInput, b), andTheAnswerIs, 'max(leftInput, b)');
// tape does not run the second assertion if the first one has failed.
tape.notEqual(b, 2, 'b != 2');
}, { tape: test, intercept: 1 });
var results = where(function(){
/***
| a | b | c |
| 1 | 2 | 2 |
| 7 | 5 | 7 |
***/
tape.equal(context.log, 1, 'should see context.log');
}, { tape: test, log: 1 });
results = where(function(){
/***
| a | b | c |
| 1 | 2 | 2 |
| 7 | 5 | c |
***/
tape.equal(Math.max(a, b), c, 'Math.max(' + a + ',' + b + ') should be ' + c);
}, { tape: test, intercept: 1 });
}