Skip to content

Commit

Permalink
simplify karma.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 22, 2021
1 parent 4d336df commit b68787a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
const { argv } = process;
let files;

for (const arg of argv) {
if (arg.startsWith('-f=')) {
files = arg.slice(3).split(',');
}
}
const files = process.argv
.find(it => it.startsWith('-f='))
.slice(3)
.split(',');

config.set({
files,
Expand Down

0 comments on commit b68787a

Please sign in to comment.