Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
fix(tests): Fix unit tests for new release
Browse files Browse the repository at this point in the history
Fixes the unit tests for the app- and child-router

Fixes  issue #87
  • Loading branch information
zewa666 committed May 4, 2015
1 parent 996407d commit 89b7578
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions test/unit/app.spec.js
Expand Up @@ -10,8 +10,14 @@ class RouterStub {
}

describe('the App module', () => {
var sut;
beforeEach(() => { sut = new App(new RouterStub()); });
var sut
, mockedRouter;

beforeEach(() => {
mockedRouter = new RouterStub();
sut = new App(mockedRouter);
sut.configureRouter(mockedRouter, mockedRouter);
});

it('contains a router property', () => {
expect(sut.router).toBeDefined();
Expand Down
10 changes: 8 additions & 2 deletions test/unit/child-router.spec.js
Expand Up @@ -10,8 +10,14 @@ class RouterStub {
}

describe('the Child Router module', () => {
var sut;
beforeEach(() => { sut = new ChildRouter(new RouterStub()); });
var sut
, mockedRouter;

beforeEach(() => {
mockedRouter = new RouterStub();
sut = new ChildRouter(mockedRouter);
sut.configureRouter(mockedRouter, mockedRouter);
});

it('contains a router property', () => {
expect(sut.router).toBeDefined();
Expand Down

0 comments on commit 89b7578

Please sign in to comment.