blob: 2e47e2a3823a9c5f31a192165fa8c09db386c00d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Flags: --expose-internals
'use strict';
const common = require('../common');
const fs = require('internal/fs/utils');
// Valid encodings and no args should not throw.
fs.assertEncoding();
fs.assertEncoding('utf8');
common.expectsError(
() => fs.assertEncoding('foo'),
{ code: 'ERR_INVALID_OPT_VALUE_ENCODING', type: TypeError }
);
|