diff options
Diffstat (limited to 'spec/frontend/mocks/mocks_helper.js')
-rw-r--r-- | spec/frontend/mocks/mocks_helper.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/frontend/mocks/mocks_helper.js b/spec/frontend/mocks/mocks_helper.js index 0aa80331434..295483cd64c 100644 --- a/spec/frontend/mocks/mocks_helper.js +++ b/spec/frontend/mocks/mocks_helper.js @@ -19,9 +19,9 @@ const prefixMap = [ // { mocksRoot: 'virtual', requirePrefix: '' }, // We'll deal with virtual mocks later ]; -const mockFileFilter = stats => stats.isFile() && stats.path.endsWith('.js'); +const mockFileFilter = (stats) => stats.isFile() && stats.path.endsWith('.js'); -const getMockFiles = root => readdir.sync(root, { deep: MAX_DEPTH, filter: mockFileFilter }); +const getMockFiles = (root) => readdir.sync(root, { deep: MAX_DEPTH, filter: mockFileFilter }); // Function that performs setting a mock. This has to be overridden by the unit test, because // jest.setMock can't be overwritten across files. @@ -36,7 +36,7 @@ export const setupManualMocks = function setupManualMocks(setMock = defaultSetMo return; } - getMockFiles(path.join(__dirname, mocksRoot)).forEach(mockPath => { + getMockFiles(path.join(__dirname, mocksRoot)).forEach((mockPath) => { const mockPathNoExt = mockPath.substring(0, mockPath.length - path.extname(mockPath).length); const sourcePath = path.join(requirePrefix, mockPathNoExt); const mockPathRelative = `./${path.join(mocksRoot, mockPathNoExt)}`; |