cypress-json-results
Advanced tools
Comparing version 1.2.1 to 1.3.0
{ | ||
"name": "cypress-json-results", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Saves Cypress test results as a JSON file", | ||
@@ -19,3 +19,3 @@ "main": "src", | ||
"devDependencies": { | ||
"cypress": "9.4.1", | ||
"cypress": "12.13.0", | ||
"prettier": "2.5.1", | ||
@@ -22,0 +22,0 @@ "semantic-release": "19.0.2" |
@@ -1,2 +0,2 @@ | ||
# cypress-json-results [![Build status][ci image]][ci url] [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-9.4.1-brightgreen) | ||
# cypress-json-results [![Build status][ci image]][ci url] [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-12.13.0-brightgreen) | ||
@@ -62,4 +62,6 @@ > Saves Cypress test results as a JSON file | ||
Note: the plugin assumes the output folder already exists | ||
**Note:** the plugin assumes the output folder already exists | ||
You can disable writing a file by using the option `filename: false`. | ||
### updateMarkdownFile | ||
@@ -66,0 +68,0 @@ |
@@ -46,5 +46,11 @@ /// <reference types="cypress" /> | ||
const str = JSON.stringify(allResults, null, 2) | ||
fs.writeFileSync(options.filename, str + '\n') | ||
console.log('cypress-json-results: wrote results to %s', options.filename) | ||
if (options.filename === false) { | ||
console.log( | ||
'cypress-json-results: skipped writing because filename=false', | ||
) | ||
} else { | ||
const str = JSON.stringify(allResults, null, 2) | ||
fs.writeFileSync(options.filename, str + '\n') | ||
console.log('cypress-json-results: wrote results to %s', options.filename) | ||
} | ||
@@ -51,0 +57,0 @@ if (options.updateMarkdownFile) { |
8428
92
156