Skip to content

Commit

Permalink
only exporting GalleryLightbox for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NataliaLKB committed Nov 2, 2017
1 parent e613ef2 commit 83ae618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ const pulseButton = (button: HTMLElement): void => {
class Endslate extends Component {
prerender(): void {
bonzo(this.elem).addClass(this.componentClass);
};
}
}



class GalleryLightbox {
showEndslate: boolean;
useSwipe: boolean;
Expand Down Expand Up @@ -651,4 +649,5 @@ const init = (): void => {
});
};

export { init, GalleryLightbox };
export { init };
export const _ = { GalleryLightbox };
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define([
Injector,
lightboxFixtures
) {

function testImageSrc(srcActual, srcTemplate) {
if (expect(srcActual).not.toBe(null)) {
var parts1 = srcTemplate.split('/'),
Expand All @@ -31,7 +32,9 @@ define([

beforeEach(function (done) {
injector.require(['common/modules/gallery/lightbox'], function(galleryLightbox) {
lightbox = new galleryLightbox.GalleryLightbox();
var GalleryLightbox = galleryLightbox._.GalleryLightbox;

lightbox = new GalleryLightbox();
done();
});
});
Expand Down

0 comments on commit 83ae618

Please sign in to comment.