MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / setup

Function setup

test/unit/components/editor/editor.test.js:31–45  ·  view source on GitHub ↗
(props = {}, portResponses = {}, portOptions = {})

Source from the content-addressed store, hash-verified

29
30describe('Editor tests', () => {
31 const setup = (props = {}, portResponses = {}, portOptions = {}) => {
32 // Configure mock responses BEFORE rendering
33 const MockEventHandler = require('../../__mocks__/lib/EventHandler').default;
34 MockEventHandler.setMockResponses(portResponses, portOptions);
35
36 const defaultProps = {
37 id: 'editor-test',
38 maxFileUploadSize: 25 * 1024 * 1024,
39 ...props
40 };
41 const ref = React.createRef();
42 const rtlUtils = render(<Editor ref={ref} {...defaultProps} />);
43
44 return {ref, ...rtlUtils};
45 };
46
47 const mockPrivKeys = [{
48 type: 'private',

Callers 1

editor.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected