diff options
Diffstat (limited to 'spec/javascripts/gl_form_spec.js')
-rw-r--r-- | spec/javascripts/gl_form_spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/javascripts/gl_form_spec.js b/spec/javascripts/gl_form_spec.js index 74383f901b2..69b3dae743a 100644 --- a/spec/javascripts/gl_form_spec.js +++ b/spec/javascripts/gl_form_spec.js @@ -5,8 +5,8 @@ import '~/lib/utils/text_utility'; import '~/lib/utils/common_utils'; describe('GLForm', () => { - describe('when instantiated', function () { - beforeEach((done) => { + describe('when instantiated', function() { + beforeEach(done => { this.form = $('<form class="gfm-form"><textarea class="js-gfm-input"></form>'); this.textarea = this.form.find('textarea'); spyOn($.prototype, 'off').and.returnValue(this.textarea); @@ -23,7 +23,7 @@ describe('GLForm', () => { }); describe('setupAutosize', () => { - beforeEach((done) => { + beforeEach(done => { this.glForm.setupAutosize(); setTimeout(() => { done(); @@ -101,6 +101,7 @@ describe('GLForm', () => { spyOn($.prototype, 'outerHeight').and.returnValue(200); spyOn($.prototype, 'data').and.returnValue(200); spyOn(autosize, 'destroy'); + expect(this.glForm.destroyAutosize()).toBeUndefined(); expect(autosize.destroy).not.toHaveBeenCalled(); }); |