MCPcopy Index your code
hub / github.com/nodejs/node / assertListFormat

Function assertListFormat

deps/v8/test/intl/list-format/format.js:5–17  ·  view source on GitHub ↗
(listFormat, input)

Source from the content-addressed store, hash-verified

3// found in the LICENSE file.
4
5function assertListFormat(listFormat, input) {
6 try {
7 let result = listFormat.format(input);
8 assertEquals('string', typeof result);
9 if (input) {
10 for (var i = 0; i < input.length; i++) {
11 assertTrue(result.indexOf(input[i]) >= 0);
12 }
13 }
14 } catch (e) {
15 fail('should not throw exception ' + e);
16 }
17}
18
19function testFormatter(listFormat) {
20 assertListFormat(listFormat, []);

Callers 1

testFormatterFunction · 0.70

Calls 5

formatMethod · 0.65
assertEqualsFunction · 0.50
assertTrueFunction · 0.50
failFunction · 0.50
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…