Skip to content

Commit

Permalink
Silence Jest warning when Ora is required in a test (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrabouillmax committed Jul 17, 2020
1 parent 132315d commit 594865f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Expand Up @@ -92,10 +92,14 @@ class StdinDiscarder {
}
}

const stdinDiscarder = new StdinDiscarder();
let stdinDiscarder;

class Ora {
constructor(options) {
if (!stdinDiscarder) {
stdinDiscarder = new StdinDiscarder();
}

if (typeof options === 'string') {
options = {
text: options
Expand Down

0 comments on commit 594865f

Please sign in to comment.