mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
failing test for #49
This commit is contained in:
@@ -208,6 +208,31 @@ function run(env) {
|
||||
|
||||
assert.ok(scrollY > 0, scrollY);
|
||||
});
|
||||
|
||||
it('reuses prefetch promise', async () => {
|
||||
await nightmare
|
||||
.goto(`${base}/blog`)
|
||||
.wait(() => window.READY)
|
||||
.wait(200);
|
||||
|
||||
const mouseover_requests = (await capture(async () => {
|
||||
await nightmare
|
||||
.mouseover('[href="/blog/what-is-sapper"]')
|
||||
.wait(200);
|
||||
})).map(r => r.url);
|
||||
|
||||
assert.deepEqual(mouseover_requests, [
|
||||
'/api/blog/what-is-sapper'
|
||||
]);
|
||||
|
||||
const click_requests = (await capture(async () => {
|
||||
await nightmare
|
||||
.click('[href="/blog/what-is-sapper"]')
|
||||
.wait(200);
|
||||
})).map(r => r.url);
|
||||
|
||||
assert.deepEqual(click_requests, []);
|
||||
});
|
||||
});
|
||||
|
||||
describe('headers', () => {
|
||||
|
||||
Reference in New Issue
Block a user