haikuwebkit/JSTests/es6/String.prototype_methods_St...

11 lines
170 B
JavaScript

function test() {
return typeof String.prototype.repeat === 'function'
&& "foo".repeat(3) === "foofoofoo";
}
if (!test())
throw new Error("Test failed");