Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Mar 31, 2017
1 parent 122d01a commit 84b7f5a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ export default class Context {
render() {
let ctx: Context = this // eslint-disable-line

// ctx.router.component(null)
// ko.tasks.runEarly()

while (ctx) {
if (isUndefined(ctx._redirect)) {
ctx.router.component(ctx.route.component)
Expand Down
4 changes: 2 additions & 2 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ export default class Router {

this.ctx = toCtx

toCtx.render()

await fromCtx.runAfterDispose()

toCtx.render()

if (!isUndefined(toCtx._redirect)) {
await toCtx.runAfterRender()
const { router: r, path: p } = traversePath(toCtx.router, toCtx._redirect)
Expand Down
1 change: 0 additions & 1 deletion test/basepath.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ko.components.register('basepath', {
t.pass('initializes with basepath')
t.equals(location.pathname, '/base/foo/foo', 'uses basepath in url on init')
t.equals(ctx.canonicalPath, '/foo/foo', 'ctx.canonicalPath is correct')
t.equals(ctx.fullPath, '/base/foo/foo', 'ctx.fullPath is correct')

ctx.router.initialized.then(() => setTimeout(() => { // Dirty hack for FF/TravisCI
t.equals($('#foo-link').attr('href'), '/base/foo/foo', 'sets href correctly in path binding')
Expand Down

0 comments on commit 84b7f5a

Please sign in to comment.