-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
Description
This implementation fails the following tests taken from https://github.com/mathiasbynens/String.prototype.endsWith/blob/master/tests/tests.js:
assertEquals('abc'.endsWith('b', -1), false);
assertEquals('abc'.endsWith('ab', -1), false);
There’s also this issue:
assertThrows(function() { '[a-z]+(bar)?'.endsWith(/(bar)?/); }, TypeError);
assertThrows(function() { '[a-z]+(bar)?'.endsWith(/(bar)?/); }, TypeError);
assertThrows(function() { '[a-z]+/(bar)?/'.endsWith(/(bar)?/); }, TypeError);
…but that’s covered in #167.
Metadata
Metadata
Assignees
Labels
No labels