aodb/wallaby.js
Martin Donnelly afe73b5baa upload
2016-12-22 00:00:06 +00:00

83 lines
2.3 KiB
JavaScript

module.exports = function (w) {
return {
files: [{
pattern: 'jspm_packages/system.js',
instrument: false
}, {
pattern: 'system.config.js',
instrument: false
}, {
pattern: 'www/scripts/lib/jquery.js',
instrument: false
}, {
pattern: 'www/scripts/lib/ionic.bundle.js',
instrument: false
}, {
pattern: 'www/scripts/lib/angular-mocks.js',
instrument: false
}, {
pattern: 'www/scripts/lib/angular-cookies.js',
instrument: false
}, {
pattern: 'www/scripts/lib/angular-ui-router.js',
instrument: false
},
{
pattern: 'www/scripts/lib/moment.js',
instrument: false
}, {
pattern: 'www/scripts/lib/chroma-framework.js',
instrument: false
}, {
pattern: 'www/scripts/app.config.js',
instrument: false
}, {
pattern: 'www/scripts/chroma.templates.compiled.js',
instrument: false
}, {
pattern: 'tests/lib/**/*.ts',
instrument: false
}, {
pattern: 'app/**/!(*.spec.ts)*.ts',
load: true
}],
tests: [{
pattern: 'app/**/*.spec.ts',
load: true
}],
compilers: {
'app/**/*.ts': w.compilers.typeScript({
module: 3,
target: 1
}),
'tests/lib/**/*.ts': w.compilers.typeScript({
module: 3,
target: 1
})
},
middleware: function (app, express) {
app.use('/jspm_packages', express.static(require('path').join(__dirname, 'jspm_packages')));
app.use('/lib', express.static(require('path').join(__dirname, 'www/scripts/lib')));
},
bootstrap: function (wallaby) {
wallaby.delayStart();
var promises = [];
for (var i = 0, len = wallaby.loadedTests.length; i < len; i++) {
promises.push(System['import'](wallaby.loadedTests[i].replace(/\\/g, '/').replace(/\.js$/, '')));
};
Promise.all(promises).then(function () {
wallaby.start();
});
}
};
};