Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 20, 2024
1 parent ace4a3c commit 3c2e0aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ console.log(obj.a); // 4
Check if member has been mocked.

```js
muk.isMocked(fs, 'readFile'); // true
const { isMocked } = require('@cnpmjs/muk-prop');

isMocked(fs, 'readFile'); // true
```

Restore all mocked methods/props after tests.

```js
muk.restore();
const { restore } = require('@cnpmjs/muk-prop');

fs.readFile(file, (err, data) => {
// will actually read from `file`
Expand Down

0 comments on commit 3c2e0aa

Please sign in to comment.