Releases: vikingair/spy4js
Releases · vikingair/spy4js
v3.4.0 (March 30, 2022)
v3.3.0 (February 09, 2022)
v3.2.0 (November 24, 2021)
v3.1.3 (July 05, 2021)
v3.1.2 (July 01, 2021)
🎆 New features
- Support for workspace root installs and global installs. Previously the package had to be installed inside the workspace members to work without any issues.
v3.1.0 (November 08, 2020)
🎆 New features
- You can now opt-in to the new enforce-order mode by
Spy.configure({ enforceOrder: true });
spy.hasCallHistory()
without any arguments will always fail now and refers to use spy.wasNotCalled()
instead if the spy wasn't called.
v3.0.0 (November 01, 2020)
Migrated to TypeScript
and dropped flow
support. Once more updating to the latest flow
version was too exhausting.
Inspecting the TypeScript
types has now become more convenient and auto import should work even smoother in your IDE, too.
💥 Breaking Changes
- The exported
Spy
is not a class anymore but an extended function/callable object. So you will need to search and replace everywherenew Spy
bySpy
because you have to callSpy
without thenew
keyword. This change was necessary because aSpyInstance
was returned by the constructor of theSpy
class, which was never really clean, but necessary when extendingFunction
as a class. - Requiring
node
version >= 12 (but it might still work with older versions). I want to encourage you to update yournode
version at least to version 12 because version 14 has now become the new LTS and version 10 will be out of maintenance soon enough.
🐛 Bugfix
spy.getAllCallArguments
was returning a wrong value, butflow
didn't catch this error.
v2.10.0 (November 06, 2019)
🎆 New Feature
spy.getAllCallArguments
: Provides a little more flexibility when observing call arguments.
v2.9.1 (November 04, 2019)
🐛 Bug Fix
- Fixed node module resolution for
Spy.mockModule
v2.9.0 (November 03, 2019)
🎆 New Feature
Spy.MAPPER
: A nice shortcut variant ofSpy.COMPARE
to test the output of given function depending on some defined input. See here for more details.