Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-log-to-output

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-log-to-output - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "cypress-log-to-output",
"version": "1.0.0",
"version": "1.0.1",
"description": "Sends all browser console logs to stdout while running your Cypress tests.",

@@ -5,0 +5,0 @@ "main": "src/log-to-output.js",

const CDP = require('chrome-remote-interface')
const chalk = require('chalk')
let eventFilter
const severityColors = {

@@ -23,2 +25,6 @@ 'verbose': (a) => a,

function logEntry(params) {
if (eventFilter && !eventFilter('browser', params.entry)) {
return
}
const { level, source, text, timestamp, url, lineNumber, stackTrace, args } = params.entry

@@ -54,2 +60,6 @@ const color = severityColors[level]

function logConsole(params) {
if (eventFilter && !eventFilter('console', params)) {
return
}
const { type, args, timestamp } = params

@@ -75,3 +85,4 @@ const level = type === 'error' ? 'error' : 'verbose'

function install(on) {
function install(on, filter) {
eventFilter = filter
on('before:browser:launch', browserLaunchHandler)

@@ -78,0 +89,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc