Upgrade to Jasmine 3.5.0.
Review Request #10747 — Created Oct. 9, 2019 and submitted — Latest diff uploaded
This upgrades Review Board's JavaScript test suite to use Jasmine 3.5
instead of the very old 2.4.1. This version provides many new features
and fixes over 2.4.1, such as:
- New spy functionality:
- Spying on promises and on properties
- Spying on all functions on an object
- Creating selective spies that execute only for specific arguments
- Setting a default spy strategy (call fake, call original, etc.) for
all spies in a suite).
- Better assertion matchers:
toBeFalse()
toBeTrue()
toBeInstanceOf()
toHaveBeenCalledBefore()
(ensuring one spy is called before
another spy)toHaveClass()
(for checking CSS classes on elements)- Plus others
- Fixes for equality comparison for arrays and objects
- Utilities for better comparing arrays and objects in a variety of ways
(treating arrays like sets, or comparing subsets of objects) - Improved ES6 support (maps, async functions, properties)
- Better error output (improved stack traces, value diffing)
- Running tests in random order to check for interdependencies
All tests continue to pass. They don't pass if using random orders,
which is normally the default, but we've disabled that by default for
our test runs.
All existing functionality (including or custom additions) continue to
work as before. There are some differences in the display of tasks that
have run, but they mostly amount to color changes and the display of
little indicators to show successful/failed tests.
All JavaScript unit tests pass.