Skip to content

Commit

Permalink
fix(unit): update wallaby.js (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
pimenovoleg committed Jul 27, 2018
1 parent ab2d687 commit 95583e0
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions wallaby.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const wallabyWebpack = require('wallaby-webpack');

const { TsConfigPathsPlugin } = require('awesome-typescript-loader');

const path = require('path');

const compilerOptions = Object.assign(
Expand Down Expand Up @@ -29,19 +27,7 @@ module.exports = function (wallaby) {

{ test: /\.css$/, loader: 'raw-loader' },
{ test: /\.html$/, loader: 'raw-loader' },
{test: /\.js$/, loader: 'angular2-template-loader', exclude: /node_modules/},
{
test: /\.ts$/,
use: [
{
loader: 'awesome-typescript-loader',
options: {
configFileName: './tsconfig.wallaby.json'
}

}
]
},
{ test: /\.js$/, loader: 'angular2-template-loader', exclude: /node_modules/ },
{test: /\.scss$|\.sass$/, loaders: ['raw-loader', 'sass-loader']}
]
},
Expand All @@ -52,16 +38,22 @@ module.exports = function (wallaby) {
path.join(wallaby.projectCacheDir, 'src'),
'node_modules'
],
plugins: [
new TsConfigPathsPlugin({
configFileName: './tsconfig.webpack.json'
})
]
alias: {
'@ptsecurity/cdk': path.join(wallaby.projectCacheDir, 'src/cdk'),
'@ptsecurity/mosaic': path.join(wallaby.projectCacheDir, 'src/lib')
}
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty',
dns: 'empty'
}
});

return {
files: [
{ pattern: 'src/wallabyTest.ts', load: false },
{ pattern: 'src/**/*.+(ts|css|scss|sass|html|json|svg)', load: false },
{ pattern: 'src/**/*.d.ts', ignore: true },
{ pattern: 'src/**/*spec.ts', ignore: true }
Expand All @@ -78,7 +70,10 @@ module.exports = function (wallaby) {
},

env: {
kind: 'chrome'
kind: 'chrome',
params: {
runner: '--headless --disable-gpu'
}
},

postprocessor: webpackPostprocessor,
Expand Down

0 comments on commit 95583e0

Please sign in to comment.