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 #57 from doktordirk/chore-test
Browse files Browse the repository at this point in the history
Chore build test
  • Loading branch information
doktordirk committed Mar 29, 2016
2 parents 9e84f30 + bf0b09d commit 1b0798e
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 49 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
2 changes: 1 addition & 1 deletion build/tasks/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ app.all('*', function(req, res) {
path: req.path,
query: req.query,
body: req.body,
host: req.host,
host: req.hostname,
method: req.method
});
});
Expand Down
4 changes: 2 additions & 2 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ gulp.task('test', ['lint'], function(done) {
var karmaServer = new KarmaServer({
configFile: __dirname + '/../../karma.conf.js',
singleRun: true
}, function() {
}, function(exitCode) {
server.stop(function() {
done();

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

Expand Down
28 changes: 1 addition & 27 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 @@ -22,19 +14,13 @@ System.config({
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-beta.1.1.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1.2.0",
"aurelia-validation": "npm:aurelia-validation@0.6.6",
"babel": "npm:babel-core@5.8.38",
"babel-runtime": "npm:babel-runtime@5.8.38",
"core-js": "npm:core-js@1.2.6",
"extend": "npm:extend@3.0.0",
"fetch": "github:github/fetch@0.11.0",
"spoonx/aurelia-api": "github:spoonx/aurelia-api@2.1.2",
"typer": "npm:typer@1.1.0",
"github:jspm/nodelibs-assert@0.1.0": {
"assert": "npm:assert@1.3.0"
},
"github:jspm/nodelibs-path@0.1.0": {
"path-browserify": "npm:path-browserify@0.0.0"
},
"github:jspm/nodelibs-process@0.1.2": {
"process": "npm:process@0.11.2"
},
Expand Down Expand Up @@ -93,21 +79,9 @@ System.config({
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1.2.0"
},
"npm:babel-runtime@5.8.38": {
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:core-js@1.2.6": {
"fs": "github:jspm/nodelibs-fs@0.1.2",
"path": "github:jspm/nodelibs-path@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
},
"npm:inherits@2.0.1": {
"util": "github:jspm/nodelibs-util@0.1.0"
},
"npm:path-browserify@0.0.0": {
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:process@0.11.2": {
"assert": "github:jspm/nodelibs-assert@0.1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', 'test/resources/**/*.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 @@ -54,9 +54,6 @@
"devDependencies": {
"aurelia-pal-browser": "npm:aurelia-pal-browser@^1.0.0-beta.1.2.0",
"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
13 changes: 0 additions & 13 deletions test/aurelia-orm.js

This file was deleted.

81 changes: 81 additions & 0 deletions test/aurelia-orm.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import {
configure,
DefaultRepository,
Repository,
Entity,
OrmMetadata,
EntityManager,
association,
resource,
endpoint,
name,
repository,
validation,
type,
validatedResource
} from '../src/aurelia-orm';
import {Container} from 'aurelia-dependency-injection';

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

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

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

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

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

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

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

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

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

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

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

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

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

it('Should export a configure method which returns the entityManager', function() {
expect(typeof configure).toEqual('function');

configure({container: new Container(), globalResources: function() {}}, function(entityManager) {
expect(entityManager instanceof EntityManager).toBe(true);
});
});
});

0 comments on commit 1b0798e

Please sign in to comment.