chore(tests): add . as base path for browserify

This allows us to reference files in (lib|test)/* via absolute path
names.
This commit is contained in:
Nico Rehwaldt 2015-10-05 15:08:49 +02:00
parent 9367f7e5c8
commit 6d86dc9e27
1 changed files with 9 additions and 1 deletions

View File

@ -1,9 +1,16 @@
'use strict'; 'use strict';
var path = require('path');
var basePath = '../../';
var absoluteBasePath = path.resolve(path.join(__dirname, basePath));
module.exports = function(karma) { module.exports = function(karma) {
karma.set({ karma.set({
basePath: '../../', basePath: basePath,
frameworks: [ 'browserify', frameworks: [ 'browserify',
'mocha', 'mocha',
@ -32,6 +39,7 @@ module.exports = function(karma) {
// browserify configuration // browserify configuration
browserify: { browserify: {
debug: true, debug: true,
paths: [ absoluteBasePath ],
transform: [ [ 'stringify', { global: true, extensions: [ '.bpmn', '.xml', '.css' ] } ] ] transform: [ [ 'stringify', { global: true, extensions: [ '.bpmn', '.xml', '.css' ] } ] ]
} }
}); });