index.js 837 B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. var ES = require('../');
  3. var test = require('tape');
  4. var keys = require('object-keys');
  5. var forEach = require('foreach');
  6. var ESkeys = keys(ES).sort();
  7. var ES6keys = keys(ES.ES6).sort();
  8. test('exposed properties', function (t) {
  9. t.deepEqual(ESkeys, ES6keys.concat(['ES2020', 'ES2019', 'ES2018', 'ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys');
  10. t.end();
  11. });
  12. test('methods match', function (t) {
  13. forEach(ES6keys, function (key) {
  14. t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method');
  15. });
  16. t.end();
  17. });
  18. require('./GetIntrinsic');
  19. require('./helpers');
  20. require('./es5');
  21. require('./es6');
  22. require('./es2015');
  23. require('./es7');
  24. require('./es2016');
  25. require('./es2017');
  26. require('./es2018');
  27. require('./es2019');
  28. require('./es2020');