(id)
| 48 | }); |
| 49 | |
| 50 | function shouldFail(id) { |
| 51 | // Skip for issue #110 |
| 52 | it.configure() |
| 53 | .ifChrome() |
| 54 | .run('should fail to load #' + id, () => { |
| 55 | const e = fixture.doc.getElementById(id); |
| 56 | expect(fixture.errors.join('\n')).to.contain( |
| 57 | e.getAttribute('data-expectederror') |
| 58 | ); |
| 59 | expect(e.getAttribute('error-message')).to.contain( |
| 60 | e.getAttribute('data-expectederror') |
| 61 | ); |
| 62 | expect(e.className).to.contain('i-amphtml-element-error'); |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | // Add cases to fixtures/errors.html and add them here. |
| 67 | shouldFail('yt0'); |
no test coverage detected