1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-17 13:56:01 +00:00
This commit is contained in:
MatteZ02
2020-03-03 22:30:50 +02:00
parent edfcc6f474
commit 30022c7634
11800 changed files with 1984416 additions and 1 deletions

View File

@ -0,0 +1,22 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '../testing/setup';
declare class HeadersWithEntries extends Headers {
entries?(): Iterable<[string, string]>;
}
export declare function compareHeaders(expectedHeaders: HeadersWithEntries, actualHeaders: HeadersWithEntries): void;
export {};

View File

@ -0,0 +1,17 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '../testing/setup';

View File

@ -0,0 +1,20 @@
/**
* @license
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';
import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies';
export declare function getFakeFirebaseDependencies(options?: FirebaseOptions): FirebaseInternalDependencies;
export declare function getFakeApp(options?: FirebaseOptions): FirebaseApp;

View File

@ -0,0 +1,83 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export declare function mockServiceWorker(): void;
export declare function restoreServiceWorker(): void;
export declare class FakeServiceWorkerRegistration implements ServiceWorkerRegistration {
active: null;
installing: null;
waiting: null;
onupdatefound: null;
pushManager: FakePushManager;
scope: string;
navigationPreload: NavigationPreloadManager;
sync: SyncManager;
updateViaCache: ServiceWorkerUpdateViaCache;
getNotifications(): Promise<never[]>;
showNotification(): Promise<void>;
update(): Promise<void>;
unregister(): Promise<boolean>;
addEventListener(): void;
removeEventListener(): void;
dispatchEvent(): boolean;
}
declare class FakePushManager implements PushManager {
private subscription;
permissionState(): Promise<"granted">;
getSubscription(): Promise<FakePushSubscription | null>;
subscribe(): Promise<FakePushSubscription>;
}
export declare class FakePushSubscription implements PushSubscription {
endpoint: string;
expirationTime: number;
auth: string;
p256: string;
getKey(name: PushEncryptionKeyName): Uint8Array;
unsubscribe(): Promise<boolean>;
toJSON: () => PushSubscriptionJSON;
options: PushSubscriptionOptions;
}
/**
* Most of the fields in here are unused / deprecated.
* They are only added here to match the TS Event interface.
*/
export declare class FakeEvent implements ExtendableEvent {
type: string;
NONE: number;
AT_TARGET: number;
BUBBLING_PHASE: number;
CAPTURING_PHASE: number;
bubbles: boolean;
cancelable: boolean;
composed: boolean;
timeStamp: number;
isTrusted: boolean;
eventPhase: number;
target: null;
currentTarget: null;
srcElement: null;
cancelBubble: boolean;
defaultPrevented: boolean;
returnValue: boolean;
preventDefault(): void;
stopPropagation(): void;
stopImmediatePropagation(): void;
initEvent(): void;
waitUntil(): void;
composedPath(): never[];
constructor(type: string, options?: EventInit);
}
export {};

View File

@ -0,0 +1,18 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { TokenDetails } from '../../interfaces/token-details';
export declare function getFakeTokenDetails(): TokenDetails;

View File

@ -0,0 +1,17 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SinonStub, SinonSpy } from 'sinon';
export declare type Stub<T extends (...args: any) => any> = SinonStub<Parameters<T>, ReturnType<T>>;
export declare type Spy<T extends (...args: any) => any> = SinonSpy<Parameters<T>, ReturnType<T>>;