diff --git a/README.md b/README.md index 806b5f8..214beec 100644 --- a/README.md +++ b/README.md @@ -77,24 +77,6 @@ results[0].expected.tersify() tersify(results[0]) ``` -## spy(fn) - -You can use `spy(fn)` to spy on function and record the calls. -It support 3 main case of async functions. -They are all converted to Promise syntax so you can get the result using `call[n].then(...)` - -```ts -import { spy } from 'satisfier' - -spy((a, b, cb) => { cb(a + 1, b - 1) }) -spy((options) => { options.success() }) -const spied = spy((a) => Promise.resolve(a + 1)) -await spied.fn(1) -const callRecord = spied.calls[0] -t.is(callRecord.arguments[0], 1) -callRecord.then(result => t.is(result, 2)) -``` - ## Contribute ```sh