diff --git a/package.json b/package.json index 64f1bd7b..d04c8279 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,6 @@ "*.css" ], "devDependencies": { - "babel-core": "^6.26.0", - "babel-preset-env": "^1.6.1", - "babelify": "^8.0.0", - "browserify": "^14.5.0", "chai": "^4.1.2", "chai-match": "^1.1.1", "cpx": "^1.5.0", @@ -52,7 +48,6 @@ "execa": "^0.8.0", "jsondiffpatch": "^0.1.26", "karma": "^2.0.2", - "karma-browserify": "^5.3.0", "karma-chrome-launcher": "^2.1.1", "karma-env-preprocessor": "^0.1.1", "karma-firefox-launcher": "^1.0.1", @@ -62,12 +57,14 @@ "karma-safari-launcher": "^1.0.0", "karma-sinon-chai": "^1.3.2", "karma-spec-reporter": "0.0.31", + "karma-webpack": "^3.0.0", "mkdirp": "^0.5.1", "mocha": "^5.2.0", "mocha-test-container-support": "0.2.0", "npm-run-all": "^4.1.2", "phantomjs-prebuilt": "^2.1.12", "puppeteer": "^0.13.0", + "raw-loader": "^0.5.1", "rollup": "^0.57.1", "rollup-plugin-commonjs": "^9.1.0", "rollup-plugin-json": "^2.3.0", @@ -77,8 +74,7 @@ "rollup-plugin-uglify": "^3.0.0", "sinon": "^4.4.6", "sinon-chai": "^2.14.0", - "stringify": "^5.2.0", - "watchify": "^3.11.0" + "webpack": "^4.16.0" }, "dependencies": { "bpmn-font": "^0.8.0", diff --git a/test/config/karma.unit.js b/test/config/karma.unit.js index 594a208f..e5eec207 100644 --- a/test/config/karma.unit.js +++ b/test/config/karma.unit.js @@ -32,17 +32,16 @@ module.exports = function(karma) { basePath: basePath, frameworks: [ - 'browserify', 'mocha', 'sinon-chai' ], files: [ - 'test/{spec,integration}/**/*Spec.js' + 'test/suite.js' ], preprocessors: { - 'test/{spec,integration}/**/*Spec.js': [ 'browserify', 'env' ] + 'test/suite.js': [ 'webpack', 'env' ] }, reporters: [ 'spec' ], @@ -65,25 +64,29 @@ module.exports = function(karma) { singleRun: true, autoWatch: false, - // browserify configuration - browserify: { - debug: true, - paths: [ absoluteBasePath ], - transform: [ - [ 'babelify', { - global: true, - babelrc: false, - presets: [ 'env' ] - } ], - [ 'stringify', { - global: true, - extensions: [ - '.bpmn', - '.xml', - '.css' - ] - } ] - ] + + webpack: { + mode: 'development', + module: { + rules: [ + { + test: /\.css|\.bpmn$/, + use: 'raw-loader' + } + ] + }, + resolve: { + mainFields: [ + 'dev:module', + 'browser', + 'module', + 'main' + ], + modules: [ + 'node_modules', + absoluteBasePath + ] + } } }); }; diff --git a/test/suite.js b/test/suite.js new file mode 100644 index 00000000..c10594d3 --- /dev/null +++ b/test/suite.js @@ -0,0 +1,3 @@ +var allTests = require.context('.', true, /(spec|integration).*Spec\.js$/); + +allTests.keys().forEach(allTests); \ No newline at end of file