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

Commit 6fa3a36

Browse files
committed
Merge pull request #67 from doktordirk/chore-build-tests
Chore build tests
2 parents 0238716 + 92158e6 commit 6fa3a36

File tree

6 files changed

+41
-60
lines changed

6 files changed

+41
-60
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- '0.11'
3+
- '0.12'
44
before_install:
55
- npm install -g jspm
66
- jspm config registries.github.auth U3Bvb25YOjY2NWIxYWQ2ZTM4ZjUxZGNjMzcwNDBkYzMxYjgxZGVkZjE1M2RjYjg=
@@ -9,3 +9,7 @@ before_script:
99
- jspm i
1010
- export DISPLAY=:99.0
1111
- sh -e /etc/init.d/xvfb start
12+
notifications:
13+
email:
14+
on_success: change
15+
on_failure: change

build/tasks/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ gulp.task('test', ['lint'], function(done) {
88
var karmaServer = new KarmaServer({
99
configFile: __dirname + '/../../karma.conf.js',
1010
singleRun: true
11-
}, function() {
11+
}, function(exitCode) {
1212
done();
1313

14-
process.exit();
14+
process.exit(exitCode);
1515
});
1616

1717
karmaServer.start();

config.js

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
System.config({
22
defaultJSExtensions: true,
3-
transpiler: "babel",
4-
babelOptions: {
5-
"optional": [
6-
"runtime",
7-
"optimisation.modules.system",
8-
"es7.decorators",
9-
"es7.classProperties"
10-
]
11-
},
3+
transpiler: false,
124
paths: {
135
"github:*": "jspm_packages/github/*",
146
"npm:*": "jspm_packages/npm/*"
@@ -19,32 +11,14 @@ System.config({
1911
"aurelia-fetch-client": "npm:[email protected]",
2012
"aurelia-polyfills": "npm:[email protected]",
2113
"aurelia-router": "npm:[email protected]",
22-
"babel": "npm:[email protected]",
23-
"babel-runtime": "npm:[email protected]",
24-
"core-js": "npm:[email protected]",
2514
"fetch": "github:github/[email protected]",
2615
"spoonx/aurelia-api": "github:spoonx/[email protected]",
27-
"github:jspm/[email protected]": {
28-
"assert": "npm:[email protected]"
29-
},
30-
"github:jspm/[email protected]": {
31-
"path-browserify": "npm:[email protected]"
32-
},
33-
"github:jspm/[email protected]": {
34-
"process": "npm:[email protected]"
35-
},
36-
"github:jspm/[email protected]": {
37-
"util": "npm:[email protected]"
38-
},
3916
"github:spoonx/[email protected]": {
4017
"aurelia-dependency-injection": "npm:[email protected]",
4118
"aurelia-fetch-client": "npm:[email protected]",
4219
"extend": "npm:[email protected]",
4320
"qs": "npm:[email protected]"
4421
},
45-
46-
"util": "npm:[email protected]"
47-
},
4822
4923
"aurelia-logging": "npm:[email protected]",
5024
"aurelia-metadata": "npm:[email protected]",
@@ -69,28 +43,6 @@ System.config({
6943
"aurelia-logging": "npm:[email protected]",
7044
"aurelia-path": "npm:[email protected]",
7145
"aurelia-route-recognizer": "npm:[email protected]"
72-
},
73-
74-
"process": "github:jspm/[email protected]"
75-
},
76-
77-
"fs": "github:jspm/[email protected]",
78-
"path": "github:jspm/[email protected]",
79-
"process": "github:jspm/[email protected]",
80-
"systemjs-json": "github:systemjs/[email protected]"
81-
},
82-
83-
"util": "github:jspm/[email protected]"
84-
},
85-
86-
"process": "github:jspm/[email protected]"
87-
},
88-
89-
"assert": "github:jspm/[email protected]"
90-
},
91-
92-
"inherits": "npm:[email protected]",
93-
"process": "github:jspm/[email protected]"
9446
}
9547
}
9648
});

karma.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function (config) {
1+
module.exports = function(config) {
22
var configuration = {
33

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

1111
jspm: {
1212
// Edit this to your needs
13-
loadFiles: ['test/setup.js', 'test/**/*.js'],
14-
serveFiles: ['src/**/*.js'],
13+
loadFiles: ['test/setup.js', 'test/**/*.spec.js'],
14+
serveFiles: ['src/**/*.js']
1515
},
1616

1717
// list of files / patterns to load in the browser

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
},
4545
"devDependencies": {
4646
"aurelia-polyfills": "npm:aurelia-polyfills@^1.0.0-beta.1.1.0",
47-
"babel": "npm:babel-core@^5.8.38",
48-
"babel-runtime": "npm:babel-runtime@^5.8.38",
49-
"core-js": "npm:core-js@^1.1.4",
5047
"fetch": "github:github/fetch@^0.11.0"
5148
}
5249
},

test/aurelia-authentication.spec.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import {Container} from 'aurelia-dependency-injection';
2-
import {configure, FetchConfig} from '../src/aurelia-authentication';
2+
import {
3+
configure,
4+
FetchConfig,
5+
AuthService,
6+
AuthorizeStep,
7+
authUtils
8+
} from '../src/aurelia-authentication';
39
import {BaseConfig} from '../src/baseConfig';
410
import {Config, Rest} from 'spoonx/aurelia-api';
511
import {HttpClient} from 'aurelia-fetch-client';
@@ -19,7 +25,29 @@ function getContainer() {
1925
return container;
2026
}
2127

22-
describe('Index', function() {
28+
describe('aurelia-authentication', function() {
29+
describe('export', function() {
30+
it('Should export configure', function() {
31+
expect(configure).toBeDefined();
32+
});
33+
34+
it('Should export FetchConfig', function() {
35+
expect(FetchConfig).toBeDefined();
36+
});
37+
38+
it('Should export AuthService', function() {
39+
expect(AuthService).toBeDefined();
40+
});
41+
42+
it('Should export AuthorizeStep', function() {
43+
expect(AuthorizeStep).toBeDefined();
44+
});
45+
46+
it('Should export authUtils', function() {
47+
expect(authUtils).toBeDefined();
48+
});
49+
});
50+
2351
describe('configure()', function() {
2452
it('Should call globalResources configuration to be passed as a function.', function() {
2553
let container = new Container();

0 commit comments

Comments
 (0)