Add implementation of 'includes' for PhantomJS
https://stackoverflow.com/a/31361163/429533
This commit is contained in:
parent
d81d1563cb
commit
13a299f28f
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue