Closed
Description
- Version: 9.3.0
- Platform: macOS
- Subsystem: assert
assert.throws
and assert.doesNotThrow
seem to treat functions that throw undefined
the same way as functions that do not throw a value.
'use strict';
const assert = require('assert');
function foo() {
throw undefined;
}
assert.throws(foo);
Expected behavior: assertion succeeds
Actual behavior: assertion fails