From f060704d1013a192e7d618a38571f7c53b3dcd32 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Sat, 13 Jan 2018 14:27:39 -0800 Subject: [PATCH] fix: update readme to remove spy --- README.md | 18 ------------------ 1 file changed, 18 deletions(-) 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