node/test/fixtures/errors/error_with_nul.js
Moshe Atlow b6738c1af0
test: migrate message tests to use assertSnapshot
PR-URL: https://github.com/nodejs/node/pull/47498
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-04-27 06:41:58 +00:00

13 lines
223 B
JavaScript

'use strict';
require('../../common');
Error.stackTraceLimit = 2;
function test() {
const a = 'abc\0def';
console.error(a);
throw new Error(a);
}
Object.defineProperty(test, 'name', { value: 'fun\0name' });
test();