Skip to content

Commit

Permalink
karma-electron
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri Cherepanov committed Nov 18, 2019
1 parent 2f64f37 commit 21f97fd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
],
"customWebpackConfig": {
"path": "./angular.webpack.js",
"target": "web"
"target": "electron-renderer"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"jasmine-core": "3.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.2.0",
"karma-chrome-launcher": "3.0.0",
"karma-coverage-istanbul-reporter": "2.1.0",
"karma-electron": "^6.3.0",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.2",
"mocha": "6.2.0",
Expand Down
20 changes: 17 additions & 3 deletions src/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function (config) {
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-electron'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
Expand All @@ -25,7 +25,21 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: true
browsers: ['AngularElectron'],
singleRun: true,
customLaunchers: {
AngularElectron: {
base: 'Electron',
browserWindowOptions: {
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent: true
}
}
}
},
client: {
useIframe: false
}
});
};

0 comments on commit 21f97fd

Please sign in to comment.