Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove common.noop #12822

Closed
wants to merge 1 commit into from
Closed

test: remove common.noop #12822

wants to merge 1 commit into from

Commits on Jul 3, 2017

  1. test: remove common.noop

    This change removes `common.noop` from the Node.js internal testing
    common module.
    
    Over the last few weeks, I've grown to dislike the `common.noop`
    abstraction.
    
    First, new (and experienced) contributors are unaware of it and so it
    results in a large number of low-value nits on PRs. It also increases
    the number of things newcomers and infrequent contributors have to be
    aware of to be effective on the project.
    
    Second, it is confusing. Is it a singleton/property or a getter? Which
    should be expected? This can lead to subtle and hard-to-find bugs. (To
    my knowledge, none have landed on master. But I also think it's only a
    matter of time.)
    
    Third, the abstraction is low-value in my opinion. What does it really
    get us? A case could me made that it is without value at all.
    
    Lastly, and this is minor, but the abstraction is wordier than not using
    the abstraction. `common.noop` doesn't save anything over `() => {}`.
    
    So, I propose removing it.
    Trott committed Jul 3, 2017
    Configuration menu
    Copy the full SHA
    d797b19 View commit details
    Browse the repository at this point in the history