return a Promise from goto - fixes #270

This commit is contained in:
Rich Harris
2018-06-27 17:32:20 -04:00
parent f821c19528
commit 57eeb5659a
3 changed files with 15 additions and 7 deletions

View File

@@ -281,9 +281,7 @@ function run({ mode, basepath = '' }) {
return nightmare
.goto(`${base}/about`)
.init()
.click('.goto')
.wait(url => window.location.pathname === url, `${basepath}/blog/what-is-sapper`)
.wait(100)
.evaluate(() => window.goto('blog/what-is-sapper'))
.title()
.then(title => {
assert.equal(title, 'What is Sapper?');