aboutsummaryrefslogtreecommitdiff
path: root/node_modules/supports-preserve-symlinks-flag/test
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/supports-preserve-symlinks-flag/test')
-rw-r--r--node_modules/supports-preserve-symlinks-flag/test/index.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js
new file mode 100644
index 0000000..9938d67
--- /dev/null
+++ b/node_modules/supports-preserve-symlinks-flag/test/index.js
@@ -0,0 +1,29 @@
+'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();
+});