karma-edgium-launcher
v4.0.0-0
Published
A Karma plugin. Launcher for Edge and Edge Canary.
Downloads
7,081
Maintainers
Readme
karma-edgium-launcher
Launcher for Edge and Edge Canary.
Installation
The easiest way is to keep karma-edgium-launcher
as a devDependency in your package.json
,
by running
$ npm i -D karma-edgium-launcher
Configuration
// karma.conf.js
module.exports = function(config) {
config.set({
browsers: ['Edge', 'Edge_without_security'], // You may use 'EdgeCanary' or any other supported browser
// you can define custom flags
customLaunchers: {
Edge_without_security: {
base: 'Edge',
flags: ['--disable-web-security', '--disable-site-isolation-trials']
}
}
})
}
The --user-data-dir
is set to a temporary directory but can be overridden on a custom launcher as shown below.
One reason to do this is to have a permanent Edge user data directory inside the project directory to be able to
install plugins there (e.g. JetBrains IDE Support plugin).
customLaunchers: {
Edge_with_debugging: {
base: 'Edge',
edgeDataDir: path.resolve(__dirname, '.edge')
}
}
You can pass list of browsers as a CLI argument too:
$ karma start --browsers Edge,Edge_without_security
Usage
$ npm i -D puppeteer karma-edgium-launcher
// karma.conf.js
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function(config) {
config.set({
browsers: ['EdgeHeadless']
})
}
For more information on Karma see the homepage.