diff options
author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 21:03:09 +0300 |
---|---|---|
committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-17 07:57:29 +0300 |
commit | 6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch) | |
tree | e7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/zen_mode_spec.js | |
parent | 28d412e5b2b8499fba22e8fabb1d44f44449228e (diff) |
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/zen_mode_spec.js')
-rw-r--r-- | spec/javascripts/zen_mode_spec.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/javascripts/zen_mode_spec.js b/spec/javascripts/zen_mode_spec.js index bdeebe0de75..e5f1e6ae937 100644 --- a/spec/javascripts/zen_mode_spec.js +++ b/spec/javascripts/zen_mode_spec.js @@ -46,12 +46,14 @@ describe('ZenMode', () => { it('should not call dropzone if element is not dropzone valid', () => { $('.div-dropzone').addClass('js-invalid-dropzone'); exitZen(); + expect(dropzoneForElementSpy.calls.count()).toEqual(0); }); it('should call dropzone if element is dropzone valid', () => { $('.div-dropzone').removeClass('js-invalid-dropzone'); exitZen(); + expect(dropzoneForElementSpy.calls.count()).toEqual(2); }); }); @@ -60,12 +62,14 @@ describe('ZenMode', () => { it('pauses Mousetrap', () => { const mouseTrapPauseSpy = spyOn(Mousetrap, 'pause'); enterZen(); + expect(mouseTrapPauseSpy).toHaveBeenCalled(); }); it('removes textarea styling', () => { $('.notes-form textarea').attr('style', 'height: 400px'); enterZen(); + expect($('.notes-form textarea')).not.toHaveAttr('style'); }); }); @@ -75,6 +79,7 @@ describe('ZenMode', () => { it('exits on Escape', () => { escapeKeydown(); + expect($('.notes-form .zen-backdrop')).not.toHaveClass('fullscreen'); }); }); @@ -85,12 +90,14 @@ describe('ZenMode', () => { it('unpauses Mousetrap', () => { const mouseTrapUnpauseSpy = spyOn(Mousetrap, 'unpause'); exitZen(); + expect(mouseTrapUnpauseSpy).toHaveBeenCalled(); }); it('restores the scroll position', () => { spyOn(zen, 'scrollTo'); exitZen(); + expect(zen.scrollTo).toHaveBeenCalled(); }); }); |