Test config update
This commit is contained in:
@@ -15,7 +15,7 @@ Run the tests once:
|
||||
|
||||
npm test
|
||||
|
||||
This will run tests in Chrome. If you do not have Chrome installed, you can run tests on Firefox instead:
|
||||
This will run tests in (headless) Chrome. If you do not have Chrome installed, you can run tests on Firefox instead:
|
||||
|
||||
npm test -- --browsers Firefox
|
||||
|
||||
@@ -25,9 +25,12 @@ To run the tests continuously:
|
||||
|
||||
npm run karma
|
||||
|
||||
After this, the test server is listening on http://localhost:9876/, and you can
|
||||
attach any number of browsers for testing (during development, tests will run
|
||||
in Chrome by default).
|
||||
After this, you can attach any browser and debug the tests like this:
|
||||
|
||||
* open http://localhost:9876/debug.html
|
||||
* open the developer tools
|
||||
* add a breakpoint
|
||||
* refresh the page
|
||||
|
||||
# Rendering tests
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ const path = require('path');
|
||||
|
||||
module.exports = function (karma) {
|
||||
karma.set({
|
||||
browsers: [process.env.CI ? 'ChromeHeadless' : 'Chrome'],
|
||||
browsers: ['ChromeHeadless'],
|
||||
browserDisconnectTolerance: 2,
|
||||
frameworks: ['webpack', 'mocha'],
|
||||
frameworks: ['webpack', 'mocha', 'source-map-support'],
|
||||
client: {
|
||||
runInParent: true,
|
||||
mocha: {
|
||||
@@ -63,14 +63,9 @@ module.exports = function (karma) {
|
||||
'/spec/': '/base/spec/',
|
||||
},
|
||||
preprocessors: {
|
||||
'**/*.js': ['webpack', 'sourcemap'],
|
||||
},
|
||||
reporters: ['dots', 'coverage-istanbul'],
|
||||
coverageIstanbulReporter: {
|
||||
reports: ['text-summary', 'html'],
|
||||
dir: path.resolve(__dirname, '../../coverage/'),
|
||||
fixWebpackSourcePaths: true,
|
||||
'**/*.js': ['webpack'], //, 'sourcemap'],
|
||||
},
|
||||
reporters: ['dots'],
|
||||
webpack: {
|
||||
devtool: 'inline-source-map',
|
||||
mode: 'development',
|
||||
@@ -97,17 +92,6 @@ module.exports = function (karma) {
|
||||
include: path.resolve('src/ol/'),
|
||||
exclude: path.resolve('node_modules/'),
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: {
|
||||
loader: 'coverage-istanbul-loader',
|
||||
options: {
|
||||
esModules: true,
|
||||
},
|
||||
},
|
||||
include: path.resolve('src/ol/'),
|
||||
exclude: path.resolve('node_modules/'),
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: {
|
||||
|
||||
Reference in New Issue
Block a user