(listFormat, input)
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | function 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 | |
| 19 | function testFormatter(listFormat) { |
| 20 | assertListFormat(listFormat, []); |
no test coverage detected
searching dependent graphs…