Fix tests

This commit is contained in:
Nathan Bierema 2021-08-25 00:00:34 -04:00
parent 96dabbd4f5
commit 3377d2165b
2 changed files with 15 additions and 14 deletions

View File

@ -468,20 +468,21 @@ export function sendMessage<S, A extends Action<unknown>>(
config.serialize as Serialize | undefined,
config.serialize as Serialize | undefined
);
} else {
toContentScript<S, A>(
{
type: 'STATE',
action: amendedAction,
payload: state,
maxAge: config.maxAge,
source,
name: config.name || name,
instanceId: config.instanceId || instanceId || 1,
},
config.serialize as Serialize | undefined,
config.serialize as Serialize | undefined
);
}
toContentScript<S, A>(
{
type: 'STATE',
action: amendedAction,
payload: state,
maxAge: config.maxAge,
source,
name: config.name || name,
instanceId: config.instanceId || instanceId || 1,
},
config.serialize as Serialize | undefined,
config.serialize as Serialize | undefined
);
}
function handleMessages(event: MessageEvent<ContentScriptToPageScriptMessage>) {

View File

@ -2,7 +2,7 @@ import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import configureStore from '../../../src/app/stores/windowStore';
import App from '../../../src/app/containers/App.js';
import App from '../../../src/app/containers/App';
const store = configureStore(store);
const component = mount(