Create toHaveSpyInteractions matcher

This matcher checks all the properties of a given spy object and checks whether at least one of the spies has been called. It returns true if one or more of the spies of the spy object has been called and false otherwise.
This commit is contained in:
Nito Buendia
2022-02-16 21:10:31 +08:00
parent b0034797fe
commit 8e85f3df74
2 changed files with 74 additions and 0 deletions

1
src/core/matchers/requireMatchers.js Normal file → Executable file
View File

@@ -27,6 +27,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
'toHaveBeenCalledTimes',
'toHaveBeenCalledWith',
'toHaveClass',
'toHaveSpyInteractions',
'toMatch',
'toThrow',
'toThrowError',