Skip to content

Commit

Permalink
refactor arguments passed from console.assert to the assert module
Browse files Browse the repository at this point in the history
  • Loading branch information
ranyitz committed Feb 17, 2018
1 parent ef53dc6 commit db08ab1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/jest-util/src/Console.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class CustomConsole extends Console {

assert(...args: Array<any>) {
try {
assert(!!args[0], ...args.slice(1));
assert(...args);
} catch (error) {
this._log('assert', error.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-util/src/buffered_console.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class BufferedConsole extends Console {

assert(...args: Array<any>) {
try {
assert(!!args[0], ...args.slice(1));
assert(...args);
} catch (error) {
this._log('assert', error.toString());
}
Expand Down

0 comments on commit db08ab1

Please sign in to comment.