mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
330f25ef82
Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: https://github.com/nodejs/node/pull/37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
39 lines
483 B
JavaScript
39 lines
483 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
[
|
|
'hex',
|
|
'utf8',
|
|
'utf-8',
|
|
'ascii',
|
|
'latin1',
|
|
'binary',
|
|
'base64',
|
|
'base64url',
|
|
'ucs2',
|
|
'ucs-2',
|
|
'utf16le',
|
|
'utf-16le',
|
|
].forEach((enc) => {
|
|
assert.strictEqual(Buffer.isEncoding(enc), true);
|
|
});
|
|
|
|
[
|
|
'utf9',
|
|
'utf-7',
|
|
'Unicode-FTW',
|
|
'new gnu gun',
|
|
false,
|
|
NaN,
|
|
{},
|
|
Infinity,
|
|
[],
|
|
1,
|
|
0,
|
|
-1,
|
|
].forEach((enc) => {
|
|
assert.strictEqual(Buffer.isEncoding(enc), false);
|
|
});
|