(implClass, options = {})
| 123 | * }=} options |
| 124 | */ |
| 125 | export function testElementR1(implClass, options = {}) { |
| 126 | const exceptions = options.exceptions || []; |
| 127 | RULES.forEach(({name, notes, test}) => { |
| 128 | if (exceptions.includes(name)) { |
| 129 | expect(test(implClass), 'unused exception: ' + name).to.be.false; |
| 130 | } else { |
| 131 | expect(test(implClass), name + (notes ? `. ${notes}` : '')).to.be.true; |
| 132 | } |
| 133 | }); |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Returns `true` if the class's source contains the given substring. |
no test coverage detected