Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Commit

Permalink
Fix polyfill tests so that they pass on Edge 15.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=249087910
  • Loading branch information
concavelenz authored and lauraharker committed May 20, 2019
1 parent d40a5e3 commit bd445e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ testSuite({

/** @suppress {checkTypes} */
testPadStart_errors() {
assertFails(RangeError, () => 'a'.padEnd(Infinity));
if (userAgent.EDGE) {
assertFails(Error, () => 'a'.padEnd(Infinity)); // Out of Memory
} else {
assertFails(RangeError, () => 'a'.padEnd(Infinity));
}
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ testSuite({

/** @suppress {checkTypes} */
testPadStart_errors() {
assertFails(RangeError, () => 'a'.padStart(Infinity));
if (userAgent.EDGE) {
assertFails(Error, () => 'a'.padEnd(Infinity)); // Out of Memory
} else {
assertFails(RangeError, () => 'a'.padStart(Infinity));
}
},
});

0 comments on commit bd445e7

Please sign in to comment.