mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 13:47:16 +00:00

PR-URL: https://github.com/nodejs/node/pull/17667 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
22 lines
410 B
JavaScript
22 lines
410 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const fs = require('fs');
|
|
|
|
[false, 1, {}, [], null, undefined].forEach((i) => {
|
|
common.expectsError(
|
|
() => fs.readlink(i, common.mustNotCall()),
|
|
{
|
|
code: 'ERR_INVALID_ARG_TYPE',
|
|
type: TypeError
|
|
}
|
|
);
|
|
common.expectsError(
|
|
() => fs.readlinkSync(i),
|
|
{
|
|
code: 'ERR_INVALID_ARG_TYPE',
|
|
type: TypeError
|
|
}
|
|
);
|
|
});
|