Skip to content

Commit

Permalink
Add tests for missing features of the polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Champion committed Jul 5, 2019
1 parent 41a157f commit f2ef9d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ describe("es6-shim", function () {

myit("length property of the normalize method is 0.", function () {
assert("foo".normalize.length, 0, "length property of the normalize method is 0.");
assert(String.prototype.normalize.length, 0, "length property of the normalize method is 0.");
});

it("throws TypeError if `this` is null", function () {
assert.throws(function () {
String.prototype.normalize.call(null);
}, TypeError);
});

it("throws TypeError if `this` is undefined", function () {
assert.throws(function () {
String.prototype.normalize.call(undefined);
}, TypeError);
});

myit("If f is not one of \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", then throw a RangeError Exception.", function () {
Expand Down

0 comments on commit f2ef9d5

Please sign in to comment.