diff options
Diffstat (limited to 'spec/frontend/zen_mode_spec.js')
-rw-r--r-- | spec/frontend/zen_mode_spec.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/zen_mode_spec.js b/spec/frontend/zen_mode_spec.js index 8e0d170289b..e874d018e92 100644 --- a/spec/frontend/zen_mode_spec.js +++ b/spec/frontend/zen_mode_spec.js @@ -3,6 +3,7 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import Dropzone from 'dropzone'; import Mousetrap from 'mousetrap'; +import * as utils from '~/lib/utils/common_utils'; import ZenMode from '~/zen_mode'; import initNotes from '~/init_notes'; @@ -103,10 +104,10 @@ describe('ZenMode', () => { }); it('restores the scroll position', () => { - jest.spyOn(zen, 'scrollTo').mockImplementation(() => {}); + jest.spyOn(utils, 'scrollToElement'); exitZen(); - expect(zen.scrollTo).toHaveBeenCalled(); + expect(utils.scrollToElement).toHaveBeenCalled(); }); }); }); |