Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hard deprecate specifying a string in stopAndPersist
  • Loading branch information
sindresorhus committed Feb 21, 2018
1 parent 7b2f196 commit 210bfb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 2 additions & 5 deletions index.js
Expand Up @@ -147,12 +147,9 @@ class Ora {
return this;
}

// Legacy argument
// TODO: Deprecate sometime in the future
// TODO: Remove in the next major version
if (typeof options === 'string') {
options = {
symbol: options
};
throw new TypeError('This argument now accepts an options object, not a string');
}

options = options || {};
Expand Down
8 changes: 0 additions & 8 deletions test.js
Expand Up @@ -106,14 +106,6 @@ test('.info()', macro, spinner => {
spinner.info();
}, /(ℹ|i) foo/);

test('.stopAndPersist()', macro, spinner => {
spinner.stopAndPersist('@');
}, /@ foo/);

test('.stopAndPersist() - with no argument', macro, spinner => {
spinner.stopAndPersist(' ');
}, /\s foo/);

test('.stopAndPersist() - with new text', macro, spinner => {
spinner.stopAndPersist({text: 'all done'});
}, /\s all done/);
Expand Down

0 comments on commit 210bfb0

Please sign in to comment.