fix tests

pull/2142/head
Audric Ackermann 4 years ago
parent 949c36a42f
commit b72b8e8387
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -185,7 +185,7 @@ export class SessionConversation extends React.Component<Props, State> {
message: window.i18n('sendRecoveryPhraseMessage'), message: window.i18n('sendRecoveryPhraseMessage'),
okTheme: SessionButtonColor.Danger, okTheme: SessionButtonColor.Danger,
onClickOk: () => { onClickOk: () => {
sendAndScroll(); void sendAndScroll();
}, },
onClickClose: () => { onClickClose: () => {
window.inboxStore?.dispatch(updateConfirmModal(null)); window.inboxStore?.dispatch(updateConfirmModal(null));
@ -193,7 +193,7 @@ export class SessionConversation extends React.Component<Props, State> {
}) })
); );
} else { } else {
sendAndScroll(); void sendAndScroll();
} }
window.inboxStore?.dispatch(quoteMessage(undefined)); window.inboxStore?.dispatch(quoteMessage(undefined));

@ -54,7 +54,8 @@ export function getLatestTimestampOffset() {
} }
export function getNowWithNetworkOffset() { export function getNowWithNetworkOffset() {
return Date.now() - getLatestTimestampOffset(); // make sure to call exports here, as we stub the exported one for testing.
return Date.now() - exports.getLatestTimestampOffset();
} }
export type SendParams = { export type SendParams = {

Loading…
Cancel
Save