This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/node_modules/supports-preserve-symlinks-flag/test/index.js

30 lines
737 B
JavaScript
Raw Normal View History

2024-03-26 16:28:28 +01:00
'use strict';
var test = require('tape');
var semver = require('semver');
var supportsPreserveSymlinks = require('../');
var browser = require('../browser');
test('supportsPreserveSymlinks', function (t) {
t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean');
t.equal(browser, null, 'browser file is `null`');
t.equal(
supportsPreserveSymlinks,
null,
'in a browser, is null',
{ skip: typeof window === 'undefined' }
);
var expected = semver.satisfies(process.version, '>= 6.2');
t.equal(
supportsPreserveSymlinks,
expected,
'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')',
{ skip: typeof window !== 'undefined' }
);
t.end();
});