Socket
Socket
Sign inDemoInstall

cypress-failed-log

Package Overview
Dependencies
10
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.9.5 to 2.10.0

on.js

8

package.json
{
"name": "cypress-failed-log",
"description": "Gets you the Cypress test command log as JSON on failure",
"version": "2.9.5",
"version": "2.10.0",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",

@@ -11,2 +11,3 @@ "bugs": "https://github.com/bahmutov/cypress-failed-log/issues",

"files": [
"on.js",
"src/*.js",

@@ -35,2 +36,3 @@ "!src/*-spec.js"

"ban": "ban",
"badges": "npx -p dependency-version-badge update-badge cypress",
"deps": "deps-ok && dependency-check . --unused --no-dev --ignore-module logdown",

@@ -56,3 +58,3 @@ "issues": "git-issues",

"ban-sensitive-files": "1.9.7",
"cypress": "9.0.0",
"cypress": "10.3.0",
"dependency-check": "4.1.0",

@@ -68,3 +70,3 @@ "deps-ok": "1.4.1",

"rimraf": "3.0.2",
"semantic-release": "19.0.2",
"semantic-release": "19.0.3",
"snap-shot-it": "7.9.3",

@@ -71,0 +73,0 @@ "standard": "14.3.3",

@@ -1,2 +0,2 @@

# cypress-failed-log
# cypress-failed-log ![cypress version](https://img.shields.io/badge/cypress-10.3.0-brightgreen)

@@ -18,20 +18,32 @@ > Shows the commands from [Cypress.io](https://www.cypress.io) failed test in the terminal.

npm install --save-dev cypress cypress-failed-log
# if using Yarn
yarn add -D cypress-failed-log
```
Then include this module from your [cypress/support/index.js](cypress/support/index.js) file
Then include this module from your [cypress/support/e2e.js](cypress/support/e2e.js) file
```js
// cypress/support/index.js
// in your cypress/support/e2e.js
// or spec file
// https://github.com/bahmutov/cypress-failed-log
require('cypress-failed-log')
// you can use the "import" keyword
import "cypress-failed-log"
```
and in [cypress/plugins/index.js](cypress/plugins/index.js) file add task `failed`
### Recommended for v10
```js
// cypress/plugins/index.js
module.exports = (on, config) => {
on('task', {
failed: require('cypress-failed-log/src/failed')(),
})
}
// cypress.config.js
const { defineConfig } = require('cypress')
module.exports = defineConfig({
defaultCommandTimeout: 500,
e2e: {
setupNodeEvents(on, config) {
// https://github.com/bahmutov/cypress-failed-log
require('cypress-failed-log/on')(on)
},
},
})
```

@@ -38,0 +50,0 @@

@@ -146,3 +146,4 @@ /// <reference types="cypress" />

const specName = path.basename(window.location.pathname)
// const specName = path.basename(window.location.pathname)
const specName = Cypress.spec.relative

@@ -149,0 +150,0 @@ console.log('=== test failed ===')

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