Skip to content

Commit

Permalink
test: use spec reporter with karma
Browse files Browse the repository at this point in the history
  • Loading branch information
platosha committed Sep 26, 2024
1 parent a1bb61a commit b838b53
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
5 changes: 3 additions & 2 deletions karma.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaCoverage = require('karma-coverage');
const karmaMocha = require('karma-mocha');
const karmaVite = require('karma-vite');
const karmaSpecReporter = require('karma-spec-reporter');

const isCI = !!process.env.CI;
const watch = !!process.argv.find((arg) => arg.includes('watch')) && !isCI;
Expand All @@ -11,7 +12,7 @@ module.exports = (config) => {
config.set({
basePath: '',

plugins: [karmaMocha, karmaChromeLauncher, karmaVite, karmaCoverage],
plugins: [karmaMocha, karmaChromeLauncher, karmaVite, karmaCoverage, karmaSpecReporter],

browsers: ['ChromeHeadlessNoSandbox'],

Expand Down Expand Up @@ -41,7 +42,7 @@ module.exports = (config) => {
},
],

reporters: ['progress', coverage && 'coverage'].filter(Boolean),
reporters: ['spec', coverage && 'coverage'].filter(Boolean),

autoWatch: watch,
singleRun: !watch,
Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"karma-iframes": "^1.3.1",
"karma-mocha": "^2.0.1",
"karma-parallel": "^0.3.1",
"karma-spec-reporter": "^0.0.36",
"karma-vite": "^1.0.4",
"magic-string": "^0.30.11",
"mocha": "^10.2.0",
Expand Down

0 comments on commit b838b53

Please sign in to comment.