Import log instead of using it off of window
This commit is contained in:
@@ -78,12 +78,12 @@ before(async () => {
|
||||
|
||||
await deleteIndexedDB();
|
||||
try {
|
||||
window.log.info('Initializing SQL in renderer');
|
||||
window.SignalWindow.log.info('Initializing SQL in renderer');
|
||||
const isTesting = true;
|
||||
await window.sqlInitializer.initialize(isTesting);
|
||||
window.log.info('SQL initialized in renderer');
|
||||
window.SignalWindow.log.info('SQL initialized in renderer');
|
||||
} catch (err) {
|
||||
window.log.error(
|
||||
window.SignalWindow.log.error(
|
||||
'SQL failed to initialize',
|
||||
err && err.stack ? err.stack : err
|
||||
);
|
||||
|
@@ -19,10 +19,12 @@ const storageMap = new Map();
|
||||
// To replicate logic we have on the client side
|
||||
global.window = {
|
||||
SignalContext: undefined,
|
||||
log: {
|
||||
info: (...args) => console.log(...args),
|
||||
warn: (...args) => console.warn(...args),
|
||||
error: (...args) => console.error(...args),
|
||||
SignalWindow: {
|
||||
log: {
|
||||
info: (...args) => console.log(...args),
|
||||
warn: (...args) => console.warn(...args),
|
||||
error: (...args) => console.error(...args),
|
||||
},
|
||||
},
|
||||
i18n: key => `i18n(${key})`,
|
||||
storage: {
|
||||
|
Reference in New Issue
Block a user