Currently, the API is exclusively synchronous. An asynchronous API would be easier when waiting for a particular state in tests.
await spy.isCalledAsync(methodName, [count], [timeout]);
await spy.isCalledWithAsync(methodName, argList, [options]);
argList can be either [arg_1, ..., arg_n] for a single call or [[arg_1_1, ..., arg_1_n], ..., [arg_m_1, ..., arg_m_n]] for multiple calls.
options can have the following properties:
orderInsensitive: when set to true then the order of the argList does not matter.
isSet: when set to true, then the argList is considered as a set.
index: when set, then the argList is matched against a particular invocation of the method, indicated by the given index.
timeout: if the assertion fails, when it cannot be resolved under the given timeout.
Currently, the API is exclusively synchronous. An asynchronous API would be easier when waiting for a particular state in tests.
await spy.isCalledAsync(methodName, [count], [timeout]);await spy.isCalledWithAsync(methodName, argList, [options]);argListcan be either[arg_1, ..., arg_n]for a single call or[[arg_1_1, ..., arg_1_n], ..., [arg_m_1, ..., arg_m_n]]for multiple calls.optionscan have the following properties:orderInsensitive: when set totruethen the order of theargListdoes not matter.isSet: when set totrue, then theargListis considered as a set.index: when set, then theargListis matched against a particular invocation of the method, indicated by the given index.timeout: if the assertion fails, when it cannot be resolved under the given timeout.