(filter: string, cases: [string, boolean][])
| 129 | |
| 130 | describe('createTargetFilter()', () => { |
| 131 | function testAll(filter: string, cases: [string, boolean][]) { |
| 132 | const filterFn = createTargetFilter(filter); |
| 133 | for (const [url, expected] of cases) { |
| 134 | expect(filterFn(url)).to.equal( |
| 135 | expected, |
| 136 | `expected ${url} to ${expected ? '' : 'not '}match ${filter}`, |
| 137 | ); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | it('returns exact match', () => { |
| 142 | testAll('http://localhost/site', [ |
no test coverage detected