Skip to content

Commit

Permalink
fix: 🐛Fixes TS definition for logger and updates script for running l…
Browse files Browse the repository at this point in the history
…ocally (#66)

* fix: 🐛Fixes TS definition for logger

* chore: 🤖Use correct boolean value when running locally

* refactor: 💡 Rename a parameter
  • Loading branch information
sweir27 authored and NoriSte committed Dec 12, 2019
1 parent 841efff commit b4eb742
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions cypress-run.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const npm = require('npm')

npm.load(() => {
const uploadRecordings = process.env.npm_package_config_cypressUploadRecordings;
const uploadRecordings = process.env.npm_package_config_cypressUploadRecordings === 'true';
const key = process.env.CYPRESS_RECORD_KEY;
if(uploadRecordings && !key) {
throw 'Missing Cypress record key';
if (uploadRecordings && !key) {
throw "Missing Cypress record key";
}
const options = uploadRecordings && key ? ['--record', '--key', key] : [];
npm.commands['run-script'](['cy:run', ...options]);
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface WaitUntilOptions {
customMessage?: string;
verbose?: boolean;
customCheckMessage?: string;
logger?: (WaitUntilLog) => any;
logger?: (logOptions: WaitUntilLog) => any;
log?: boolean;
}

Expand Down
10 changes: 3 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4eb742

Please sign in to comment.