From 6d86dc9e27c776736c0b85bb9abd9222071d617e Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 5 Oct 2015 15:08:49 +0200 Subject: [PATCH] chore(tests): add . as base path for browserify This allows us to reference files in (lib|test)/* via absolute path names. --- test/config/karma.unit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/config/karma.unit.js b/test/config/karma.unit.js index 8cf80922..e1d6c436 100644 --- a/test/config/karma.unit.js +++ b/test/config/karma.unit.js @@ -1,9 +1,16 @@ 'use strict'; +var path = require('path'); + +var basePath = '../../'; + +var absoluteBasePath = path.resolve(path.join(__dirname, basePath)); + + module.exports = function(karma) { karma.set({ - basePath: '../../', + basePath: basePath, frameworks: [ 'browserify', 'mocha', @@ -32,6 +39,7 @@ module.exports = function(karma) { // browserify configuration browserify: { debug: true, + paths: [ absoluteBasePath ], transform: [ [ 'stringify', { global: true, extensions: [ '.bpmn', '.xml', '.css' ] } ] ] } });