mirror of https://github.com/nodejs/node.git
14 lines
308 B
JavaScript
14 lines
308 B
JavaScript
// This tests that cp() throws if options is not object.
|
|
|
|
import '../common/index.mjs';
|
|
import assert from 'node:assert';
|
|
import { cp } from 'node:fs';
|
|
import tmpdir from '../common/tmpdir.js';
|
|
|
|
tmpdir.refresh();
|
|
|
|
assert.throws(
|
|
() => cp('a', 'b', 'hello', () => {}),
|
|
{ code: 'ERR_INVALID_ARG_TYPE' }
|
|
);
|