Add an option to disable order checking
- Lingua principale
- JavaScript
- Stelle
- 141
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.