MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

update spec/strings

+23 -1
+1 -1
examples/results.txt
··· 666 666 compat-table/es6/Set.prototype.keys.js: OK 667 667 compat-table/es6/Set.prototype.size.js: OK 668 668 compat-table/es6/Set.prototype.values.js: OK 669 - compat-table/es6/Set.zero-key.js: failed 669 + compat-table/es6/Set.zero-key.js: OK 670 670 compat-table/es6/String.fromCodePoint.js: OK 671 671 compat-table/es6/String.iterator-prototype-chain.js: OK 672 672 compat-table/es6/String.prototype.Symbol.iterator.js: OK
+22
examples/spec/strings.js
··· 70 70 test('replace', 'hello world'.replace('world', 'there'), 'hello there'); 71 71 test('replaceAll', 'a-b-c'.replaceAll('-', '_'), 'a_b_c'); 72 72 73 + test( 74 + 'template missing placeholders stay empty', 75 + 'Hello, {{name}}. Missing: {{missing}}.'.template({ name: 'Ant' }), 76 + 'Hello, Ant. Missing: .' 77 + ); 78 + test( 79 + 'template placeholder values use normal string coercion', 80 + '{{nil}}/{{undef}}/{{obj}}/{{arr}}/{{ok}}'.template({ 81 + nil: null, 82 + undef: undefined, 83 + obj: { toString() { return 'custom'; } }, 84 + arr: [1, 2], 85 + ok: false 86 + }), 87 + 'null/undefined/custom/1,2/false' 88 + ); 89 + test( 90 + 'template unterminated placeholders remain literal', 91 + 'before {{name after'.template({ name: 'ignored' }), 92 + 'before {{name after' 93 + ); 94 + 73 95 testDeep('match', 'test123'.match(/\d+/), ['123']); 74 96 75 97 test('at positive', 'hello'.at(1), 'e');