Skip to content

Commit

Permalink
fix(test): fix running tests & add a sample test
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktim committed Jan 31, 2016
1 parent 0f4548c commit 87d82e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"karma-chrome-launcher": "^0.1.7",
"karma-coverage": "^0.3.1",
"karma-jasmine": "^0.3.5",
"karma-jspm": "^1.1.5",
"karma-jspm": "^2.0.1-beta.2",
"object.assign": "^1.0.3",
"require-dir": "^0.1.0",
"run-sequence": "^1.0.2",
Expand Down
21 changes: 21 additions & 0 deletions test/unit/configure.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {configure} from '../../src/index';

class ConfigStub {
globalResources(...resources) {
this.resources = resources;
}
}

describe('the Aurelia configuration', () => {
var mockedConfiguration;

beforeEach(() => {
mockedConfiguration = new ConfigStub();
configure(mockedConfiguration);
});

it('should register a global resource', () => {
expect(mockedConfiguration.resources).toContain('./hello-world');
});

});

0 comments on commit 87d82e3

Please sign in to comment.