diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-12-06 12:29:59 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-12-06 12:29:59 +0300 |
commit | 2018039536c3d31b6fa8d8e6bcd75d5cf322aba0 (patch) | |
tree | 15818406f97ae3970b3eed8da76868cc2e497d2e /spec/javascripts/image_diff | |
parent | 5d9585d1bde360c9bba2dc960523cbe1e648994f (diff) |
Export template selector as ES6 modules
Diffstat (limited to 'spec/javascripts/image_diff')
-rw-r--r-- | spec/javascripts/image_diff/helpers/utils_helper_spec.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/spec/javascripts/image_diff/helpers/utils_helper_spec.js b/spec/javascripts/image_diff/helpers/utils_helper_spec.js index 56d77a05c4c..31949c39d9c 100644 --- a/spec/javascripts/image_diff/helpers/utils_helper_spec.js +++ b/spec/javascripts/image_diff/helpers/utils_helper_spec.js @@ -157,27 +157,19 @@ describe('utilsHelper', () => { beforeEach(() => { window.gl = window.gl || (window.gl = {}); glCache = window.gl; - window.gl.ImageFile = () => {}; fileEl = document.createElement('div'); fileEl.innerHTML = ` <div class="diff-file"></div> `; - spyOn(ImageDiff.prototype, 'init').and.callFake(() => {}); spyOn(ReplacedImageDiff.prototype, 'init').and.callFake(() => {}); + spyOn(ImageDiff.prototype, 'init').and.callFake(() => {}); }); afterEach(() => { window.gl = glCache; }); - it('should initialize gl.ImageFile', () => { - spyOn(window.gl, 'ImageFile'); - - utilsHelper.initImageDiff(fileEl, false, false); - expect(gl.ImageFile).toHaveBeenCalled(); - }); - it('should initialize ImageDiff if js-single-image', () => { const diffFileEl = fileEl.querySelector('.diff-file'); diffFileEl.innerHTML = ` |