Skip to content

Latest commit

 

History

History
199 lines (110 loc) · 7.21 KB

3.5.0.md

File metadata and controls

199 lines (110 loc) · 7.21 KB

Jasmine Core 3.5 Release Notes

Summary

This is a maintenance release of Jasmine with a number of new features and fixes

Highlights

  • The output of toHaveBeenCalledWith should now be more readable

This breaks each call out onto its own line, so that it's much easier to see where each call starts and how they differ. E.g. previously the output would be:

Expected spy foo to have been called with [ 'bar', 'baz', 'qux' ] but actual calls were [ [ 42, 'wibble' ], [ 'bar' 'qux' ], [ 'grault '] ]

Now it's:

Expected spy foo to have been called with:
  [ 'bar', 'baz', 'qux' ]
but actual calls were:
  [ 42, 'wibble' ],
  [ 'bar' 'qux' ],
  [ 'grault '].
  • Add new spy strategies to resolve and reject Promises resolveTo and rejectWith

  • Add the ability to have custom async matchers

Internal notes

  • Stop testing against PhantomJS

    • PhantomJS is at end of life, and the last version of Selenium that supported it was 3.6.0, released almost three years ago. We can't test Jasmine against PhantomJS without pinning key pieces of the project to increasingly outdated versions of key libraries.
  • Fail Jasmine's CI build if the promise returned from jasmineBrowser.runSpecs is rejected

  • A bunch of other rejiggering of the Travis-CI builds to make them easier to work with

  • Also released a new browser runner that is being used by Jasmine

    • See jasmine-browser-runner
    • This is a first pass at getting this to work for other projects as well. Please try it out and let us know what isn't working for you.
  • add prettier and eslint

All Changes

  • Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled

  • Correctly propagate the Error object caught by the global error handler to reporters, etc.

  • Show argument diffs in toHaveBeenCalledWith failure messages

  • Updated arrayContaining to require actual values to be arrays

  • Add the ability to have custom async matchers

    • Merges #1732 from @UziTech
  • Allow users to set a default spy strategy

    • Merges #1716 from @elliot-nelson
  • Accept configurations with Promise: undefined.

  • PrettyPrinter survives if objects throw in toString

  • Add mapContaining and setContaining asymmetric matchers

    • Merges #1741 from @eventlistener
  • Use the same spec file pattern for both node and browser

  • Gemspec: Drop EOL'd property rubyforge_project

    • Merges #1736 from @olleolleolle
  • Updated async timeout message to include all of the ways that async code can be run in Jasmine

  • Allow users to pass property names to createSpyObj

  • don't attempt to normalize PNGs (gitattributes)

    • Merges #1721 from @elliot-nelson
  • Add @since to most JSDoc comments

  • Make no expectations in HTML Reporter message a console warning

  • Prevent page overflow in HTML reporter under some situations by setting an explicit width

    • Merges #1713 from @pixelpax
  • Cleanup: minor dead code removal and style fixes

    • Merges #1708 from @elliot-nelson
  • Pretty Printer can now handle printing an object whose toString function has been spied upon

    • Merges #1712 from @johnjbarton
  • PrettyPrinter handles objects with invalid toString implementations

  • Fix toBeCloseTo matcher for Node.js 12 and Chrome 74

  • spyOnProperty jasmine-style error messages with usage note

    • Merges #1706 from @elliot-nelson
  • spyOnProperty respects the allowRespy flag

    • Merges #1705 from @elliot-nelson
  • Introduce matchers#toBeInstanceOf

    • Merges #1697 from @elliot-nelson
  • Print global errors encountered during CI runs

    • Merges #1701 from @elliot-nelson
  • Update contributing doc based on some of the newer tooling

  • Extend spyOnAllFunctions to include prototype and parent methods

  • Improve error handling in CI test launcher

    • Merges #1598 from @elliot-nelson
  • Add new spy strategies to resolve and reject Promises resolveTo and rejectWith

  • Update deprecation messages to indicate future removal

  • Add toBeRejectedWithError matcher

  • Ignore internal ci.js from npm package

  • Fix failure messages for positive/negative infinity matchers

  • nit: fix typo

    • Merges #1680 from @acinader
  • added #toBeTrue and #toBeFalse matchers

    • Merges #1679 from @FelixRilling

_Release Notes generated with Anchorman