Skip to content

Commit b74fe2d

Browse files
committed
refactor(jsonFileMock): rename throwErrror to errror
1 parent 39c0fed commit b74fe2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

__mocks__/jsonfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use strict';
22
const jsonfile = jest.genMockFromModule('jsonfile');
33

4-
let throwError;
4+
let error;
55

6-
const setup = withError => (throwError = withError);
6+
const setup = createError => (error = createError);
77

88
const writeFile = jest.fn((fileName, order, cb) => {
9-
throwError ? cb('Something went wrong') : cb();
9+
error ? cb('Something went wrong') : cb();
1010
});
1111
jsonfile.setup = setup;
1212
jsonfile.writeFile = writeFile;

0 commit comments

Comments
 (0)