ember-browser-services 1.1.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +0,0 @@
1
- import { proxyService } from 'ember-browser-services/utils/proxy-service';
2
-
3
- interface TestLocation extends Partial<Location> {
4
- href?: string;
5
- }
6
-
7
- export interface TestWindow {
8
- parent?: TestWindow;
9
- top?: TestWindow;
10
- location?: TestLocation;
11
- }
12
-
13
- class FakeLocation {
14
- href = '';
15
-
16
- replace(href: string) {
17
- this.href = href;
18
- }
19
- }
20
-
21
- class FakeWindow {
22
- location = new FakeLocation();
23
- top = this;
24
- parent = this;
25
- }
26
-
27
- export const FakeWindowService = proxyService(FakeWindow);
@@ -1,6 +0,0 @@
1
- import Service from '@ember/service';
2
- import type { Class } from 'ember-browser-services/types';
3
- declare type UnknownObject = Record<string, any>;
4
- export declare function maybeMake<DefaultType extends typeof Service, TestClass extends UnknownObject>(maybeImplementation: true | typeof Service | TestClass, defaultImplementation: DefaultType): typeof Service;
5
- export declare function testableVersionOf<Real extends object, TestInstance extends object, TestClass extends Class<TestInstance>>(real: Real, Klass: TestClass): TestInstance;
6
- export {};
@@ -1,8 +0,0 @@
1
- export interface TestDocument {
2
- title: string;
3
- }
4
- declare class FakeDocument {
5
- title: string;
6
- }
7
- export declare const FakeDocumentService: typeof import("@ember/service").default & FakeDocument;
8
- export {};
@@ -1,14 +0,0 @@
1
- import Service from '@ember/service';
2
- declare type FakeLocalStorage = Record<string, string>;
3
- /**
4
- * Mimics the window.localStorage API
5
- *
6
- */
7
- export declare class FakeLocalStorageService extends Service {
8
- fakeLocalStorage: FakeLocalStorage;
9
- setItem(key: string, value: string): void;
10
- getItem(key: string): string | null;
11
- removeItem(key: string): void;
12
- clear(): void;
13
- }
14
- export {};
@@ -1,4 +0,0 @@
1
- export declare type TestNavigator = typeof fakeNavigator;
2
- export declare const fakeMediaDevices: object;
3
- export declare const fakeNavigator: object;
4
- export declare const FakeNavigatorService: typeof import("@ember/service").default & object;
@@ -1,19 +0,0 @@
1
- interface TestLocation extends Partial<Location> {
2
- href?: string;
3
- }
4
- export interface TestWindow {
5
- parent?: TestWindow;
6
- top?: TestWindow;
7
- location?: TestLocation;
8
- }
9
- declare class FakeLocation {
10
- href: string;
11
- replace(href: string): void;
12
- }
13
- declare class FakeWindow {
14
- location: FakeLocation;
15
- top: this;
16
- parent: this;
17
- }
18
- export declare const FakeWindowService: typeof import("@ember/service").default & FakeWindow;
19
- export {};