mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 05:45:27 +00:00
argh
This commit is contained in:
@@ -32,6 +32,8 @@ Nightmare.action('prefetchRoutes', function(done) {
|
|||||||
|
|
||||||
const cli = path.resolve(__dirname, '../../sapper');
|
const cli = path.resolve(__dirname, '../../sapper');
|
||||||
|
|
||||||
|
const wait = ms => new Promise(f => setTimeout(f, ms));
|
||||||
|
|
||||||
describe('sapper', function() {
|
describe('sapper', function() {
|
||||||
process.chdir(path.resolve(__dirname, '../app'));
|
process.chdir(path.resolve(__dirname, '../app'));
|
||||||
|
|
||||||
@@ -266,8 +268,9 @@ function run({ mode, basepath = '' }) {
|
|||||||
})
|
})
|
||||||
.then(requests => {
|
.then(requests => {
|
||||||
assert.deepEqual(requests.map(r => r.url), []);
|
assert.deepEqual(requests.map(r => r.url), []);
|
||||||
return nightmare.path();
|
|
||||||
})
|
})
|
||||||
|
.then(() => wait(100))
|
||||||
|
.then(() => nightmare.path())
|
||||||
.then(path => {
|
.then(path => {
|
||||||
assert.equal(path, `${basepath}/about`);
|
assert.equal(path, `${basepath}/about`);
|
||||||
return nightmare.title();
|
return nightmare.title();
|
||||||
|
|||||||
Reference in New Issue
Block a user