Skip to content

Commit

Permalink
chore: fix errorOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Mar 7, 2019
1 parent 278991c commit eec0876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -95,7 +95,7 @@ Just like `mm.error()`, but only mock error once.
const mm = require('mm');
const fs = require('fs');

mm.errorOne(fs, 'readFile', 'mock fs.readFile return error');
mm.errorOnce(fs, 'readFile', 'mock fs.readFile return error');

fs.readFile('/etc/hosts', 'utf8', function (err, content) {
// err.name === 'MockError'
Expand Down

0 comments on commit eec0876

Please sign in to comment.