We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39c0fed commit b74fe2dCopy full SHA for b74fe2d
__mocks__/jsonfile.js
@@ -1,12 +1,12 @@
1
'use strict';
2
const jsonfile = jest.genMockFromModule('jsonfile');
3
4
-let throwError;
+let error;
5
6
-const setup = withError => (throwError = withError);
+const setup = createError => (error = createError);
7
8
const writeFile = jest.fn((fileName, order, cb) => {
9
- throwError ? cb('Something went wrong') : cb();
+ error ? cb('Something went wrong') : cb();
10
});
11
jsonfile.setup = setup;
12
jsonfile.writeFile = writeFile;
0 commit comments