github-pages-deploy-action/node_modules/es-abstract/test/index.js

36 lines
865 B
JavaScript
Raw Normal View History

2020-01-28 13:08:03 +08:00
'use strict';
var ES = require('../');
var test = require('tape');
2020-03-07 11:45:40 +08:00
var keys = require('object-keys');
var forEach = require('foreach');
2020-01-28 13:08:03 +08:00
2020-03-07 11:45:40 +08:00
var ESkeys = keys(ES).sort();
var ES6keys = keys(ES.ES6).sort();
2020-01-28 13:08:03 +08:00
test('exposed properties', function (t) {
t.deepEqual(ESkeys, ES6keys.concat(['ES2019', 'ES2018', 'ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys');
t.end();
});
test('methods match', function (t) {
2020-03-07 11:45:40 +08:00
forEach(ES6keys, function (key) {
2020-01-28 13:08:03 +08:00
t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method');
});
t.end();
});
require('./GetIntrinsic');
2020-03-07 11:45:40 +08:00
require('./helpers/getSymbolDescription');
require('./helpers/OwnPropertyKeys');
2020-01-28 13:08:03 +08:00
require('./es5');
require('./es6');
require('./es2015');
require('./es7');
require('./es2016');
require('./es2017');
require('./es2018');
require('./es2019');