diff --git a/package.json b/package.json index 7c0302789..040ff70a9 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "wdio": "wdio" }, "dependencies": { - "@skyux/core": "3.0.2", + "@skyux/core": "3.1.0", "@skyux/theme": "3.1.0", "dragula": "3.7.2", "intl": "1.2.5", diff --git a/src/modules/testing/mocks/mock-media-query.service.ts b/src/modules/testing/mocks/mock-media-query.service.ts index 69c3b5ddc..42174054c 100644 --- a/src/modules/testing/mocks/mock-media-query.service.ts +++ b/src/modules/testing/mocks/mock-media-query.service.ts @@ -1,54 +1,3 @@ -import { - Injectable, - NgZone -} from '@angular/core'; -import { - SkyMediaQueryListener, - SkyMediaBreakpoints, - SkyMediaQueryService -} from '../../media-queries'; - -import { Subscription } from 'rxjs/Subscription'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; - -@Injectable() -export class MockSkyMediaQueryService extends SkyMediaQueryService { - public static xs = '(max-width: 767px)'; - public static sm = '(min-width: 768px) and (max-width: 991px)'; - public static md = '(min-width: 992px) and (max-width: 1199px)'; - public static lg = '(min-width: 1200px)'; - - public get current(): SkyMediaBreakpoints { - return this._currentBreakpoints; - } - - public set current(breakpoints: SkyMediaBreakpoints) { - this._currentBreakpoints = breakpoints; - } - - public currentMockSubject: BehaviorSubject - = new BehaviorSubject(this.current); - - private _currentBreakpoints: SkyMediaBreakpoints = SkyMediaBreakpoints.md; - - constructor() { - super(new NgZone({enableLongStackTrace: true})); - } - - public subscribe(listener: SkyMediaQueryListener): Subscription { - return this.currentMockSubject.subscribe( - { - next: (breakpoints: SkyMediaBreakpoints) => { - listener(breakpoints); - } - } - ); - } - - public fire(args: SkyMediaBreakpoints) { - this._currentBreakpoints = args; - this.currentMockSubject.next(this._currentBreakpoints); - } - - public destroy() {} -} +export { + MockSkyMediaQueryService +} from '@skyux/core/testing/mock-media-query.service';