diff options
Diffstat (limited to 'spec/frontend/gl_form_spec.js')
-rw-r--r-- | spec/frontend/gl_form_spec.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/frontend/gl_form_spec.js b/spec/frontend/gl_form_spec.js index 07487fbb60e..ab5627ce216 100644 --- a/spec/frontend/gl_form_spec.js +++ b/spec/frontend/gl_form_spec.js @@ -8,7 +8,7 @@ describe('GLForm', () => { const testContext = {}; describe('when instantiated', () => { - beforeEach((done) => { + beforeEach(() => { window.gl = window.gl || {}; testContext.form = $('<form class="gfm-form"><textarea class="js-gfm-input"></form>'); @@ -18,22 +18,11 @@ describe('GLForm', () => { jest.spyOn($.prototype, 'css').mockImplementation(() => {}); testContext.glForm = new GLForm(testContext.form, false); - - setImmediate(() => { - $.prototype.off.mockClear(); - $.prototype.on.mockClear(); - $.prototype.css.mockClear(); - done(); - }); }); describe('setupAutosize', () => { - beforeEach((done) => { + beforeEach(() => { testContext.glForm.setupAutosize(); - - setImmediate(() => { - done(); - }); }); it('should register an autosize event handler on the textarea', () => { |