Skip to content

Commit

Permalink
[test] Remove dead method
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 14, 2020
1 parent 94df7d7 commit 804433e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions test/utils/consoleErrorMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ class ConsoleErrorMock {
throw new Error('Requested call count before spy() was called');
};

args = () => {
throw new TypeError(
'args() was removed in favor of messages(). ' +
'Use messages() to match against the actual error message that will be displayed in the console.',
);
};

/**
* returns the formatted message for each call
*
Expand Down

3 comments on commit 804433e

@eps1lon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was dead for a reason for contributors who are still used to the old method. This gave a much better error message than "undefined is not a function". Just leave this in for a couple of months. Doesn't hurt anybody.

@oliviertassinari
Copy link
Member Author

@oliviertassinari oliviertassinari commented on 804433e Mar 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was dead for a reason for contributors who are still used to the old method

Thanks for the confirmation, I have assumed that it was the reason it was kept for. I don't think that outside of both of us, any contributors will be impacted. But happy to keep it if you think strongly. My main fear is that we will forget about it. It will confuse new developers looking at the class.

@eps1lon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will confuse new developers looking at the class.

What is confusing about this? It's a method that recommends using another one. Why? Ask git blame. That is not something that is outside of the realm of learnable things.

Please sign in to comment.