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

Implemented new semantics for the 'was called with' assertion. #29

Closed
wants to merge 1 commit into from

Commits on Jan 22, 2016

  1. Implemented new semantics for the 'was called with' assertion.

    * Require an array to be passed instead of supporting varargs.
      In my opinion that is much clearer.
      Also, it gets rid of this annoying edge zero params case:
      `expect(spy, 'was called with');`
    
    * Removed the 'exactly' flag -- always require an exact match.
      Since expect.it is supported, there are better ways of
      asserting only on a prefix of the argument list. If it turns out
      there's a clear enough use case, we can consider implementing
      a `was called with initial`, or we can add support for
      `<spy> was [always] called with <object>` so you can specify
      exactly which arguments via numerical properties.
    
    This is, of course, a very breaking change, but I think we should rip off
    the band-aid and do a major version bump. Most test suites that rely on
    the old convention will be caught by the type system.
    papandreou committed Jan 22, 2016
    Configuration menu
    Copy the full SHA
    9bdef43 View commit details
    Browse the repository at this point in the history