node/test/parallel/test-path-makelong.js
Gibson Fahnestock 3d2aef3979 test: s/assert.equal/assert.strictEqual/
Use assert.strictEqual instead of assert.equal in tests, manually
convert types where necessary.

PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2017-01-11 14:19:26 +00:00

26 lines
1.0 KiB
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const path = require('path');
if (common.isWindows) {
const file = path.join(common.fixturesDir, 'a.js');
const resolvedFile = path.resolve(file);
assert.strictEqual('\\\\?\\' + resolvedFile, path._makeLong(file));
assert.strictEqual('\\\\?\\' + resolvedFile, path._makeLong('\\\\?\\' +
file));
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile',
path._makeLong('\\\\someserver\\someshare\\somefile'));
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile', path
._makeLong('\\\\?\\UNC\\someserver\\someshare\\somefile'));
assert.strictEqual('\\\\.\\pipe\\somepipe',
path._makeLong('\\\\.\\pipe\\somepipe'));
}
assert.strictEqual(path._makeLong(null), null);
assert.strictEqual(path._makeLong(100), 100);
assert.strictEqual(path._makeLong(path), path);
assert.strictEqual(path._makeLong(false), false);
assert.strictEqual(path._makeLong(true), true);