diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/mocks/mocks_helper_spec.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/mocks/mocks_helper_spec.js')
-rw-r--r-- | spec/frontend/mocks/mocks_helper_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/mocks/mocks_helper_spec.js b/spec/frontend/mocks/mocks_helper_spec.js index a91e8ecfa4a..0abe5c6b949 100644 --- a/spec/frontend/mocks/mocks_helper_spec.js +++ b/spec/frontend/mocks/mocks_helper_spec.js @@ -47,13 +47,13 @@ describe('mocks_helper.js', () => { const readdirSpy = readdir.sync; expect(readdirSpy).toHaveBeenCalled(); - readdirSpy.mock.calls.forEach(call => { + readdirSpy.mock.calls.forEach((call) => { expect(call[1].deep).toBeLessThan(100); }); }); it('sets up mocks for CE (the ~/ prefix)', () => { - fs.existsSync.mockImplementation(root => root.endsWith('ce')); + fs.existsSync.mockImplementation((root) => root.endsWith('ce')); readdir.sync.mockReturnValue(['root.js', 'lib/utils/util.js']); setupManualMocks(); @@ -72,7 +72,7 @@ describe('mocks_helper.js', () => { }; fs.existsSync.mockReturnValue(true); - readdir.sync.mockImplementation(root => files[root]); + readdir.sync.mockImplementation((root) => files[root]); setupManualMocks(); expect(readdir.sync).toHaveBeenCalledTimes(1); @@ -84,7 +84,7 @@ describe('mocks_helper.js', () => { }); it('fails when given a virtual mock', () => { - fs.existsSync.mockImplementation(p => p.endsWith('ce')); + fs.existsSync.mockImplementation((p) => p.endsWith('ce')); readdir.sync.mockReturnValue(['virtual', 'shouldntBeImported']); setMock.mockImplementation(() => { throw new Error('Could not locate module'); @@ -106,7 +106,7 @@ describe('mocks_helper.js', () => { }); }); - it('survives jest.isolateModules()', done => { + it('survives jest.isolateModules()', (done) => { jest.isolateModules(() => { const axios2 = require('~/lib/utils/axios_utils').default; expect(axios2.isMock).toBe(true); |