mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 00:18:45 +01:00
Use esbuild
This commit is contained in:
18
ts/test-both/helpers/RemoteConfigStub.ts
Normal file
18
ts/test-both/helpers/RemoteConfigStub.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { refreshRemoteConfig } from '../../RemoteConfig';
|
||||
import type { WebAPIType } from '../../textsecure/WebAPI';
|
||||
import type { UnwrapPromise } from '../../types/Util';
|
||||
|
||||
export async function updateRemoteConfig(
|
||||
newConfig: UnwrapPromise<ReturnType<WebAPIType['getConfig']>>
|
||||
): Promise<void> {
|
||||
const fakeServer = {
|
||||
async getConfig() {
|
||||
return newConfig;
|
||||
},
|
||||
} as Partial<WebAPIType> as unknown as WebAPIType;
|
||||
|
||||
await refreshRemoteConfig(fakeServer);
|
||||
}
|
||||
Reference in New Issue
Block a user