wait for window.READY so that this tests we dont double-preload

This commit is contained in:
Rich Harris
2018-01-14 10:44:38 -05:00
parent a80ac3a8b8
commit 2abfdb03d5

View File

@@ -289,6 +289,7 @@ function run(env) {
it('passes entire request object to preload', () => {
return nightmare
.goto(`${base}/show-url`)
.wait(() => window.READY)
.evaluate(() => document.querySelector('p').innerHTML)
.end().then(html => {
assert.equal(html, `URL is /show-url`);