jest-it-up
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -11,3 +11,3 @@ const fs = require('fs') | ||
const reportPath = path.resolve( | ||
process.cwd(), | ||
path.dirname(configPath), | ||
coverageDirectory, | ||
@@ -14,0 +14,0 @@ 'coverage-summary.json', |
@@ -13,2 +13,3 @@ #!/usr/bin/env node | ||
module.exports = async ({ | ||
config = 'jest.config.js', | ||
dryRun = false, | ||
@@ -19,3 +20,3 @@ interactive = false, | ||
} = {}) => { | ||
const configPath = path.resolve(process.cwd(), 'jest.config.js') | ||
const configPath = path.resolve(process.cwd(), config) | ||
@@ -47,3 +48,3 @@ const { thresholds, coverages } = await getData(configPath) | ||
outputResult(dryRun) | ||
outputResult(configPath, dryRun) | ||
} |
const { yellow } = require('ansi-colors') | ||
const outputResult = dryRun => { | ||
const outputResult = (configPath, dryRun) => { | ||
console.log( | ||
dryRun | ||
? `No changes made to ${yellow('jest.config.js')}. (dry-run mode)` | ||
: `Done! Please record the changes to ${yellow('jest.config.js')}.`, | ||
? `No changes made to ${yellow(configPath)}. (dry-run mode)` | ||
: `Done! Please record the changes to ${yellow(configPath)}.`, | ||
) | ||
@@ -9,0 +9,0 @@ } |
{ | ||
"name": "jest-it-up", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Automatically bump up global Jest thresholds whenever coverage goes above them", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -66,2 +66,3 @@ # jest-it-up | ||
Options: | ||
-c, --config <path> path to a Jest config file (default: 'jest.config.js') | ||
-m, --margin <margin> minimum threshold increase (default: 0) | ||
@@ -68,0 +69,0 @@ -i, --interactive ask for confirmation before applying changes |
Sorry, the diff of this file is not supported yet
8982
127
74