Socket
Socket
Sign inDemoInstall

karma-brief-reporter

Package Overview
Dependencies
154
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

8

lib/brief.js

@@ -47,3 +47,3 @@ 'use strict'

const failure = this.store.save(browser, result)
if (!this.options.suppressErrorReportDuringRun) {
if (this.options.earlyErrorReport) {
printers.printTestFailureDuringRun(failure)

@@ -64,3 +64,5 @@ }

} else {
printers.printTestFailures(this.store.getData())
if (!this.options.earlyErrorReport) {
printers.printTestFailures(this.store.getData())
}
if (!this.options.suppressBrowserLogs) {

@@ -86,3 +88,3 @@ printers.printBrowserLogs(this.browserLogs)

suppressErrorReport: false,
suppressErrorReportDuringRun: false,
earlyErrorReport: false,
suppressErrorHighlighting: false,

@@ -89,0 +91,0 @@ renderOnRunCompleteOnly: false

{
"name": "karma-brief-reporter",
"description": "Reports test progress statistics and lists failures at the end of a Karma test run.",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/prantlf/karma-brief-reporter",

@@ -6,0 +6,0 @@ "author": {

@@ -92,5 +92,8 @@ [![npm version](https://badge.fury.io/js/karma-brief-reporter.svg)](http://badge.fury.io/js/karma-brief-reporter)

// Suppress the immediate error report after each failing test.
// If this is set to true, suppressErrorReport has to be true too.
suppressErrorReportDuringRun: true, // default is false
// Print the test failures immediately instead of at the end.
// The brief summary is updated on the last line. If this
// is set to true, suppressErrorReport must be set to false.
// Enable this, if you want to watch the failed test names
// and descriptions and break the test run, when you want.
earlyErrorReport: true, // default is false

@@ -97,0 +100,0 @@ // Suppress the red background on errors in the error

@@ -108,3 +108,3 @@ /* eslint-env mocha */

expect(brief.options.suppressErrorReport).to.be.false
expect(brief.options.suppressErrorReportDuringRun).to.be.false
expect(brief.options.earlyErrorReport).to.be.false
expect(brief.options.suppressErrorHighlighting).to.be.false

@@ -120,3 +120,3 @@ expect(brief.options.renderOnRunCompleteOnly).to.be.false

'suppressErrorReport': true,
'suppressErrorReportDuringRun': true,
'earlyErrorReport': true,
'suppressErrorHighlighting': true,

@@ -131,3 +131,3 @@ 'renderOnRunCompleteOnly': true,

expect(brief.options.suppressErrorReport).to.be.true
expect(brief.options.suppressErrorReportDuringRun).to.be.true
expect(brief.options.earlyErrorReport).to.be.true
expect(brief.options.suppressErrorHighlighting).to.be.true

@@ -301,2 +301,3 @@ expect(brief.options.renderOnRunCompleteOnly).to.be.true

brief.store = storeInstanceFake
brief.browserErrors = []
})

@@ -327,13 +328,22 @@

it('should only print the failure immediately when suppressErrorReportDuringRun is false', function () {
brief.options.suppressErrorReportDuringRun = true
it('should only print the failure immediately when earlyErrorReport is true', function () {
brief.options.suppressErrorReport = false
brief.options.earlyErrorReport = true
brief.onSpecComplete(browser, result)
brief.onRunComplete()
expect(printersFake.printTestFailureDuringRun.called).to.be.false
expect(printersFake.printTestFailureDuringRun.calledOnce).to.be.true
expect(printersFake.printTestFailures.calledOnce).to.be.false
brief.options.suppressErrorReportDuringRun = false
brief.store.save = sinon.stub()
brief.store.save.returns({})
printersFake.printTestFailureDuringRun = sinon.spy()
printersFake.printTestFailures = sinon.spy()
brief.options.earlyErrorReport = false
brief.onSpecComplete(browser, result)
brief.onRunComplete()
expect(printersFake.printTestFailureDuringRun.calledOnce).to.be.true
expect(storeInstanceFake.save.calledWithExactly(browser, result)).to.be.true
expect(printersFake.printTestFailureDuringRun.calledOnce).to.be.false
expect(printersFake.printTestFailures.calledOnce).to.be.true
})

@@ -340,0 +350,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc