Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
BUGFIX: Fix cli spinner.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Ruff committed Sep 24, 2018
1 parent 14acafe commit 19977b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/async.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

const {start} = require('ora');
const ora = require('ora');
const {error} = require('./logger.js');

const asyncUtils = {
Expand All @@ -12,7 +12,7 @@ const asyncUtils = {
* @return {Promise} The Promise that resolves once the function has been resolved.
*/
exec(fn: Function, ...args: Array<any>) {
const spinner = start();
const spinner = ora().start();
return fn(...args)
.then(() => spinner.stop())
.catch(e => {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/async.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @flow

jest.mock('./logger.js');
jest.mock('ora', () => ({
jest.mock('ora', () => jest.fn(() => ({
start: jest.fn(() => ({
stop: jest.fn()
}))
}));
})));

const logger = require('./logger.js');
const asyncUtils = require('./async.js');
Expand Down

0 comments on commit 19977b4

Please sign in to comment.