Home | History | Annotate | Download | only in es6

Lines Matching defs:string

28 assertEquals(1, String.prototype.startsWith.length);
46 assertThrows("String.prototype.startsWith.call(null, 'test')", TypeError);
47 assertThrows("String.prototype.startsWith.call(null, null)", TypeError);
48 assertThrows("String.prototype.startsWith.call(undefined, undefined)", TypeError);
50 assertThrows("String.prototype.startsWith.apply(null, ['test'])", TypeError);
51 assertThrows("String.prototype.startsWith.apply(null, [null])", TypeError);
52 assertThrows("String.prototype.startsWith.apply(undefined, [undefined])", TypeError);
55 msg: "Empty string", val: ""
81 var s = String(v);
83 assertTrue(String.prototype.startsWith.call(v, v), e.msg);
84 assertTrue(String.prototype.startsWith.apply(v, [v]), e.msg);
90 this.startsWith = String.prototype.startsWith;
92 return String(value);
134 // https://github.com/mathiasbynens/String.prototype.startsWith/blob/master/tests/tests.js
137 assertEquals(String.prototype.startsWith.length, 1);
138 assertEquals(String.prototype.propertyIsEnumerable("startsWith"), false);
298 var string = "I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9";
299 assertEquals(string.startsWith(""), true);
300 assertEquals(string.startsWith("\xF1t\xEBr"), false);
301 assertEquals(string.startsWith("\xF1t\xEBr", 1), true);
302 assertEquals(string.startsWith("\xE0liz\xE6"), false);
303 assertEquals(string.startsWith("\xE0liz\xE6", 11), true);
304 assertEquals(string.startsWith("\xF8n\u2603\uD83D\uDCA9"), false);
305 assertEquals(string.startsWith("\xF8n\u2603\uD83D\uDCA9", 18), true);
306 assertEquals(string.startsWith("\u2603"), false);
307 assertEquals(string.startsWith("\u2603", 20), true);
308 assertEquals(string.startsWith("\uD83D\uDCA9"), false);
309 assertEquals(string.startsWith("\uD83D\uDCA9", 21), true);
312 String.prototype.startsWith.call(undefined);
315 String.prototype.startsWith.call(undefined, "b");
318 String.prototype.startsWith.call(undefined, "b", 4);
321 String.prototype.startsWith.call(null);
324 String.prototype.startsWith.call(null, "b");
327 String.prototype.startsWith.call(null, "b", 4);
329 assertEquals(String.prototype.startsWith.call(42, "2"), false);
330 assertEquals(String.prototype.startsWith.call(42, "4"), true);
331 assertEquals(String.prototype.startsWith.call(42, "b", 4), false);
332 assertEquals(String.prototype.startsWith.call(42, "2", 1), true);
333 assertEquals(String.prototype.startsWith.call(42, "2", 4), false);
334 assertEquals(String.prototype.startsWith.call({
337 assertEquals(String.prototype.startsWith.call({
340 assertEquals(String.prototype.startsWith.call({
344 String.prototype.startsWith.call({
349 String.prototype.startsWith.call({
355 String.prototype.startsWith.apply(undefined);
358 String.prototype.startsWith.apply(undefined, ["b"]);
361 String.prototype.startsWith.apply(undefined, ["b", 4]);
364 String.prototype.startsWith.apply(null);
367 String.prototype.startsWith.apply(null, ["b"]);
370 String.prototype.startsWith.apply(null, ["b", 4]);
372 assertEquals(String.prototype.startsWith.apply(42, ["2"]), false);
373 assertEquals(String.prototype.startsWith.apply(42, ["4"]), true);
374 assertEquals(String.prototype.startsWith.apply(42, ["b", 4]), false);
375 assertEquals(String.prototype.startsWith.apply(42, ["2", 1]), true);
376 assertEquals(String.prototype.startsWith.apply(42, ["2", 4]), false);
377 assertEquals(String.prototype.startsWith.apply({
382 assertEquals(String.prototype.startsWith.apply({
387 assertEquals(String.prototype.startsWith.apply({
393 String.prototype.startsWith.apply({
398 String.prototype.startsWith.apply({