mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
12 lines
356 B
JavaScript
12 lines
356 B
JavaScript
|
'use strict';
|
||
|
|
||
|
// This tests module.enableCompileCache() throws when an invalid argument is passed.
|
||
|
|
||
|
require('../common');
|
||
|
const { enableCompileCache } = require('module');
|
||
|
const assert = require('assert');
|
||
|
|
||
|
for (const invalid of [0, null, false, () => {}, {}, []]) {
|
||
|
assert.throws(() => enableCompileCache(invalid), { code: 'ERR_INVALID_ARG_TYPE' });
|
||
|
}
|