Home | History | Annotate | Download | only in es6

Lines Matching defs:string

28 assertEquals(1, String.prototype.endsWith.length);
46 assertThrows("String.prototype.endsWith.call(null, 'test')", TypeError);
47 assertThrows("String.prototype.endsWith.call(null, null)", TypeError);
48 assertThrows("String.prototype.endsWith.call(undefined, undefined)", TypeError);
50 assertThrows("String.prototype.endsWith.apply(null, ['test'])", TypeError);
51 assertThrows("String.prototype.endsWith.apply(null, [null])", TypeError);
52 assertThrows("String.prototype.endsWith.apply(undefined, [undefined])", TypeError);
55 msg: "Empty string", val: ""
81 var s = String(v);
83 assertTrue(String.prototype.endsWith.call(v, v), e.msg);
84 assertTrue(String.prototype.endsWith.apply(v, [v]), e.msg);
90 this.endsWith = String.prototype.endsWith;
92 return String(value);
135 // https://github.com/mathiasbynens/String.prototype.endsWith/blob/master/tests/tests.js
138 assertEquals(String.prototype.endsWith.length, 1);
139 assertEquals(String.prototype.propertyIsEnumerable("endsWith"), false);
313 var string = "I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9";
314 assertEquals(string.endsWith(""), true);
315 assertEquals(string.endsWith("\xF1t\xEBr"), false);
316 assertEquals(string.endsWith("\xF1t\xEBr", 5), true);
317 assertEquals(string.endsWith("\xE0liz\xE6"), false);
318 assertEquals(string.endsWith("\xE0liz\xE6", 16), true);
319 assertEquals(string.endsWith("\xF8n\u2603\uD83D\uDCA9"), true);
320 assertEquals(string.endsWith("\xF8n\u2603\uD83D\uDCA9", 23), true);
321 assertEquals(string.endsWith("\u2603"), false);
322 assertEquals(string.endsWith("\u2603", 21), true);
323 assertEquals(string.endsWith("\uD83D\uDCA9"), true);
324 assertEquals(string.endsWith("\uD83D\uDCA9", 23), true);
327 String.prototype.endsWith.call(undefined);
330 String.prototype.endsWith.call(undefined, "b");
333 String.prototype.endsWith.call(undefined, "b", 4);
336 String.prototype.endsWith.call(null);
339 String.prototype.endsWith.call(null, "b");
342 String.prototype.endsWith.call(null, "b", 4);
344 assertEquals(String.prototype.endsWith.call(42, "2"), true);
345 assertEquals(String.prototype.endsWith.call(42, "4"), false);
346 assertEquals(String.prototype.endsWith.call(42, "b", 4), false);
347 assertEquals(String.prototype.endsWith.call(42, "2", 1), false);
348 assertEquals(String.prototype.endsWith.call(42, "2", 4), true);
349 assertEquals(String.prototype.endsWith.call({
352 assertEquals(String.prototype.endsWith.call({
355 assertEquals(String.prototype.endsWith.call({
359 String.prototype.endsWith.call({
364 String.prototype.endsWith.call({
370 String.prototype.endsWith.apply(undefined);
373 String.prototype.endsWith.apply(undefined, ["b"]); },
376 String.prototype.endsWith.apply(undefined, ["b", 4]);
379 String.prototype.endsWith.apply(null);
382 String.prototype.endsWith.apply(null, ["b"]);
385 String.prototype.endsWith.apply(null, ["b", 4]);
387 assertEquals(String.prototype.endsWith.apply(42, ["2"]), true);
388 assertEquals(String.prototype.endsWith.apply(42, ["4"]), false);
389 assertEquals(String.prototype.endsWith.apply(42, ["b", 4]), false);
390 assertEquals(String.prototype.endsWith.apply(42, ["2", 1]), false);
391 assertEquals(String.prototype.endsWith.apply(42, ["2", 4]), true);
392 assertEquals(String.prototype.endsWith.apply({
395 assertEquals(String.prototype.endsWith.apply({
398 assertEquals(String.prototype.endsWith.apply({
402 String.prototype.endsWith.apply({
407 String.prototype.endsWith.apply({