mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
82b1b55122
Add `process.setSourceMapsEnabled` to enable source-maps programmatically. PR-URL: https://github.com/nodejs/node/pull/39085 Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
17 lines
276 B
JavaScript
17 lines
276 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const unexpectedValues = [
|
|
undefined,
|
|
null,
|
|
1,
|
|
{},
|
|
() => {},
|
|
];
|
|
for (const it of unexpectedValues) {
|
|
assert.throws(() => {
|
|
process.setSourceMapsEnabled(it);
|
|
}, /ERR_INVALID_ARG_TYPE/);
|
|
}
|