2021-01-06 17:23:15 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2021-01-06 15:41:43 +00:00
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
|
|
|
// To replicate logic we have on the client side
|
|
|
|
global.window = {
|
|
|
|
log: {
|
|
|
|
info: (...args) => console.log(...args),
|
|
|
|
warn: (...args) => console.warn(...args),
|
|
|
|
error: (...args) => console.error(...args),
|
|
|
|
},
|
|
|
|
i18n: key => `i18n(${key})`,
|
|
|
|
};
|
|
|
|
|
|
|
|
// For ducks/network.getEmptyState()
|
|
|
|
global.navigator = {};
|
|
|
|
global.WebSocket = {};
|