summaryrefslogtreecommitdiff
path: root/node_modules/supports-preserve-symlinks-flag/test/index.js
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:54:57 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:57:48 +0100
commitb1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c (patch)
tree49d360fd6cbc6a2754efe93524ac47ff0fbe0f7d /node_modules/supports-preserve-symlinks-flag/test/index.js
Docs
Diffstat (limited to 'node_modules/supports-preserve-symlinks-flag/test/index.js')
-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();
+});