Skip to content

Commit acdc9b4

Browse files
committed
fix static tests
1 parent c5991d3 commit acdc9b4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/* eslint-disable max-nested-callbacks */
67
define([
78
'mage/gallery/gallery',
89
'jquery'
@@ -83,20 +84,22 @@ define([
8384
describe('"initGallery" method', function () {
8485
it('Verify gallery initialization', function () {
8586
originSpy = $.fn.data;
86-
jqueryDataMock = {
87+
jqueryDataMock = {
8788
setOptions: jasmine.createSpy().and.returnValue(true),
8889
updateOptions: jasmine.createSpy().and.returnValue(true)
89-
}
90-
spyOn($.fn, 'data').and.callFake(function () { return jqueryDataMock });
91-
90+
};
91+
spyOn($.fn, 'data').and.callFake(function () {
92+
return jqueryDataMock;
93+
});
94+
9295
gallery = new Gallery(options, element);
9396
expect(gallery.settings.$elementF.class).toBe(element[1]);
9497
expect(gallery.settings.fullscreenConfig).toBeDefined();
9598
expect(gallery.settings.fotoramaApi).toBeDefined();
9699
expect(gallery.settings.data).toBeDefined();
97100
expect(gallery.settings.api).toBeDefined();
98101

99-
$.fn.data = originSpy;
102+
$.fn.data = originSpy;
100103
});
101104
});
102105
});

0 commit comments

Comments
 (0)