From 87d82e339bc34ae73d85f7136c93eb793d0b3cf6 Mon Sep 17 00:00:00 2001 From: Erik Timmers Date: Sun, 31 Jan 2016 15:20:00 +0100 Subject: [PATCH] fix(test): fix running tests & add a sample test --- package.json | 2 +- test/unit/configure.spec.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 test/unit/configure.spec.js diff --git a/package.json b/package.json index 843fdd9..009b62c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/unit/configure.spec.js b/test/unit/configure.spec.js new file mode 100644 index 0000000..9cdb57d --- /dev/null +++ b/test/unit/configure.spec.js @@ -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'); + }); + +});