Add an option to disable order checking
未关闭
- 主要语言
- JavaScript
- 星标
- 141
- 派生
- 15
- PR 合并指标
- 30 天内没有已合并 PR
描述
Sometimes we want a function to be called before the process exits, but we don't care if other calls happen until then. The use case I have in mind is catching `Promise`s that never settles. What I would like to write is:
```js
async function testFn() {
gently.expect(someObject, 'someMethod')
await someObject.testedMethod()
}
asyncFn().then(gently.expect(1, function callAfterThen() {});
```
If I try that, I'll get `Error: Unexpected call to [SomeClass].someMethod(), expected call to callAfterThen()`.
Could we get an option to disable order checking? Or another method `gently.expectEventually` maybe?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。