Closed
Description
- Version: v10.1.0
- Platform: Linux arch-seckinger 4.16.9-1-ARCH deps: update openssl to 1.0.1j #1 SMP PREEMPT Thu May 17 02:10:09 UTC 2018 x86_64 GNU/Linux
- Subsystem: assert
Apparently introduced by #18322.
I'm working on a PR to fix this.
code
new Function("assert", "assert(1 === 2);")(require("assert"));
expected behavior
(this is what happens with node 6, 7, 8 and 9)
throws an AssertionError: false == true
actual behavior
(with node 10)
throws
assert.js:163
if (filename.endsWith('.js') && NativeModule.exists(filename.slice(0, -3))) {
^
TypeError: Cannot read property 'endsWith' of undefined