You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
737 B

2 years ago
  1. 'use strict';
  2. var test = require('tape');
  3. var semver = require('semver');
  4. var supportsPreserveSymlinks = require('../');
  5. var browser = require('../browser');
  6. test('supportsPreserveSymlinks', function (t) {
  7. t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean');
  8. t.equal(browser, null, 'browser file is `null`');
  9. t.equal(
  10. supportsPreserveSymlinks,
  11. null,
  12. 'in a browser, is null',
  13. { skip: typeof window === 'undefined' }
  14. );
  15. var expected = semver.satisfies(process.version, '>= 6.2');
  16. t.equal(
  17. supportsPreserveSymlinks,
  18. expected,
  19. 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')',
  20. { skip: typeof window !== 'undefined' }
  21. );
  22. t.end();
  23. });