Skip to content

Commit

Permalink
Update ecmascript-runtime to test Array polyfills.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel authored and Ben Newman committed Jun 8, 2017
1 parent 912906a commit d780b4d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/ecmascript-runtime/runtime-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ Tinytest.add("ecmascript-containers - Set", function (test) {
});

Tinytest.add("core-js - Array", function (test) {
test.equal(typeof Array.from, "function");
test.equal(typeof Array.of, "function");
test.equal(typeof Array.isArray, "function");
test.equal(typeof Array.prototype[Symbol.iterator], "function");
test.equal(typeof Array.prototype.copyWithin, "function");
test.equal(typeof Array.prototype.fill, "function");
test.equal(typeof Array.prototype.find, "function");
test.equal(typeof Array.prototype.findIndex, "function");
test.equal(typeof Array.prototype.slice, "function");
test.equal(typeof Array.prototype.join, "function");
test.equal(typeof Array.prototype.indexOf, "function");
test.equal(typeof Array.prototype.lastIndexOf, "function");
test.equal(typeof Array.prototype.every, "function");
test.equal(typeof Array.prototype.some, "function");
test.equal(typeof Array.prototype.forEach, "function");
test.equal(typeof Array.prototype.map, "function");
test.equal(typeof Array.prototype.filter, "function");
test.equal(typeof Array.prototype.reduce, "function");
test.equal(typeof Array.prototype.reduceRight, "function");
test.equal(typeof Array.prototype.sort, "function");

test.equal(Array.from("123", Number), [1, 2, 3]);
test.equal(Array.of(1, 3, 5), [1, 3, 5]);
test.equal(
Expand Down

0 comments on commit d780b4d

Please sign in to comment.