Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #67 from doktordirk/chore-build-tests
Browse files Browse the repository at this point in the history
Chore build tests
  • Loading branch information
doktordirk committed Mar 29, 2016
2 parents 0238716 + 92158e6 commit 6fa3a36
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 60 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '0.11'
- '0.12'
before_install:
- npm install -g jspm
- jspm config registries.github.auth U3Bvb25YOjY2NWIxYWQ2ZTM4ZjUxZGNjMzcwNDBkYzMxYjgxZGVkZjE1M2RjYjg=
Expand All @@ -9,3 +9,7 @@ before_script:
- jspm i
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
email:
on_success: change
on_failure: change
4 changes: 2 additions & 2 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ gulp.task('test', ['lint'], function(done) {
var karmaServer = new KarmaServer({
configFile: __dirname + '/../../karma.conf.js',
singleRun: true
}, function() {
}, function(exitCode) {
done();

process.exit();
process.exit(exitCode);
});

karmaServer.start();
Expand Down
50 changes: 1 addition & 49 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system",
"es7.decorators",
"es7.classProperties"
]
},
transpiler: false,
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
Expand All @@ -19,32 +11,14 @@ System.config({
"aurelia-fetch-client": "npm:[email protected]",
"aurelia-polyfills": "npm:[email protected]",
"aurelia-router": "npm:[email protected]",
"babel": "npm:[email protected]",
"babel-runtime": "npm:[email protected]",
"core-js": "npm:[email protected]",
"fetch": "github:github/[email protected]",
"spoonx/aurelia-api": "github:spoonx/[email protected]",
"github:jspm/[email protected]": {
"assert": "npm:[email protected]"
},
"github:jspm/[email protected]": {
"path-browserify": "npm:[email protected]"
},
"github:jspm/[email protected]": {
"process": "npm:[email protected]"
},
"github:jspm/[email protected]": {
"util": "npm:[email protected]"
},
"github:spoonx/[email protected]": {
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-fetch-client": "npm:[email protected]",
"extend": "npm:[email protected]",
"qs": "npm:[email protected]"
},
"npm:[email protected]": {
"util": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
Expand All @@ -69,28 +43,6 @@ System.config({
"aurelia-logging": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-route-recognizer": "npm:[email protected]"
},
"npm:[email protected]": {
"process": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"fs": "github:jspm/[email protected]",
"path": "github:jspm/[email protected]",
"process": "github:jspm/[email protected]",
"systemjs-json": "github:systemjs/[email protected]"
},
"npm:[email protected]": {
"util": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"process": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"assert": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"inherits": "npm:[email protected]",
"process": "github:jspm/[email protected]"
}
}
});
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function (config) {
module.exports = function(config) {
var configuration = {

// base path that will be used to resolve all patterns (eg. files, exclude)
Expand All @@ -10,8 +10,8 @@ module.exports = function (config) {

jspm: {
// Edit this to your needs
loadFiles: ['test/setup.js', 'test/**/*.js'],
serveFiles: ['src/**/*.js'],
loadFiles: ['test/setup.js', 'test/**/*.spec.js'],
serveFiles: ['src/**/*.js']
},

// list of files / patterns to load in the browser
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
},
"devDependencies": {
"aurelia-polyfills": "npm:aurelia-polyfills@^1.0.0-beta.1.1.0",
"babel": "npm:babel-core@^5.8.38",
"babel-runtime": "npm:babel-runtime@^5.8.38",
"core-js": "npm:core-js@^1.1.4",
"fetch": "github:github/fetch@^0.11.0"
}
},
Expand Down
32 changes: 30 additions & 2 deletions test/aurelia-authentication.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import {Container} from 'aurelia-dependency-injection';
import {configure, FetchConfig} from '../src/aurelia-authentication';
import {
configure,
FetchConfig,
AuthService,
AuthorizeStep,
authUtils
} from '../src/aurelia-authentication';
import {BaseConfig} from '../src/baseConfig';
import {Config, Rest} from 'spoonx/aurelia-api';
import {HttpClient} from 'aurelia-fetch-client';
Expand All @@ -19,7 +25,29 @@ function getContainer() {
return container;
}

describe('Index', function() {
describe('aurelia-authentication', function() {
describe('export', function() {
it('Should export configure', function() {
expect(configure).toBeDefined();
});

it('Should export FetchConfig', function() {
expect(FetchConfig).toBeDefined();
});

it('Should export AuthService', function() {
expect(AuthService).toBeDefined();
});

it('Should export AuthorizeStep', function() {
expect(AuthorizeStep).toBeDefined();
});

it('Should export authUtils', function() {
expect(authUtils).toBeDefined();
});
});

describe('configure()', function() {
it('Should call globalResources configuration to be passed as a function.', function() {
let container = new Container();
Expand Down

0 comments on commit 6fa3a36

Please sign in to comment.