diff --git a/test/resources/images/loading.html b/test/resources/images/loading.html new file mode 100644 index 00000000..16755da1 --- /dev/null +++ b/test/resources/images/loading.html @@ -0,0 +1,8 @@ +
+
+ +
+ + + +
diff --git a/test/spec/special.spec.ts b/test/spec/special.spec.ts index 5658b3e3..6425195a 100644 --- a/test/spec/special.spec.ts +++ b/test/spec/special.spec.ts @@ -3,7 +3,7 @@ import '../spec/setup' import { toPng } from '../../src' import { delay } from '../../src/util' -import { bootstrap, renderAndCheck } from '../spec/helper' +import { assertTextRendered, bootstrap, renderAndCheck } from '../spec/helper' describe('special cases', () => { xit('should not crash when loading external stylesheet causes error', (done) => { @@ -52,4 +52,11 @@ describe('special cases', () => { .catch(done), ) }) + + it('should caputre lazy loading images', (done) => { + bootstrap('images/loading.html', 'images/style.css') + .then(assertTextRendered(['PNG', 'JPG'])) + .then(done) + .catch(done) + }) })