Skip to content

Commit

Permalink
feat(build): added config file for wallabyjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Fâciu authored and valorkin committed Oct 4, 2016
1 parent e71a8ae commit cec8bae
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tsconfig.json
tsconfig.publish.json
tslint.json
typedoc.js
wallaby.js

# demo build
doc
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"tslint-config-valorsoft": "1.1.1",
"typedoc": "0.4.5",
"typescript": "2.0.3",
"wallaby-webpack": "0.0.24",
"zone.js": "0.6.25"
}
}
43 changes: 43 additions & 0 deletions wallaby.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'use strict';

const wallabyWebpack = require('wallaby-webpack');
const webpackPostprocessor = wallabyWebpack({
entryPatterns: [
'spec-bundle.js',
'components/**/*spec.js'
],

module: {
loaders: [
{test: /\.css$/, loader: 'raw-loader'},
{test: /\.html$/, loader: 'raw-loader'}
]
}
});

module.exports = function conifg() {
return {
files: [
{pattern: 'spec-bundle.js', load: false},
{pattern: 'components/**/*.ts', load: false},
{pattern: 'components/**/*.css', load: false},
{pattern: 'components/**/*.html', load: false},
'!components/**/*.spec.ts'
],

tests: [
{pattern: 'components/**/*.spec.ts', load: false}
],

testFramework: 'jasmine',

env: {
runner: require('phantomjs-prebuilt').path, // eslint-disable-line
params: {runner: '--web-security=false'}
},

postprocessor: webpackPostprocessor,

setup: () => window.__moduleBundler.loadTests() // eslint-disable-line
};
};

0 comments on commit cec8bae

Please sign in to comment.