Skip to content

Commit

Permalink
Add implementation of 'includes' for PhantomJS
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning authored and davehunt committed Jun 1, 2018
1 parent d81d156 commit 13a299f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions testing/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

if (!String.prototype.includes) {
String.prototype.includes = function() {'use strict';
return String.prototype.indexOf.apply(this, arguments) !== -1;
};
}

QUnit.module( 'module', {
beforeEach: function( assert ) {
init();
Expand Down

0 comments on commit 13a299f

Please sign in to comment.