Switch to Chromium Headless with Karma for testing

This commit is contained in:
Ayushman Chhabra 2022-02-11 20:16:05 +05:30
parent b96ea85cc2
commit 9bbc9d241d
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,9 @@
// Karma configuration
// Generated on Tue Jul 22 2014 23:49:26 GMT+0200 (Romance Daylight Time)
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();
module.exports = function(config) {
var mapToSrcFolder = function (path) {return ['src', path].join('/');};
@ -64,8 +67,12 @@ module.exports = function(config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
browsers: ['ChromeHeadless'],
plugins: [
'karma-chrome-launcher',
'karma-jasmine',
],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits

View File

@ -55,13 +55,15 @@
"grunt-spritesmith": "^6.9.0",
"jasmine-core": "3.8.0",
"karma": "6.3.4",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "4.0.1",
"karma-phantomjs-launcher": "1.0.4",
"load-grunt-tasks": "5.1.0",
"nw": "0.54.0",
"phantomjs-prebuilt": "2.1.16",
"phantomjs-polyfill-object-assign": "0.0.2",
"phantomjs-prebuilt": "2.1.16",
"promise-polyfill": "8.2.0",
"puppeteer": "^13.3.1",
"rmdir": "1.2.0"
},
"window": {