UNPKG

passbolt-styleguide

Version:

Passbolt styleguide contains common styling assets used by the different sites, plugin, etc.

37 lines (33 loc) 853 B
/** * Returns the default app context for the unit test * @param appContext An existing app context * @returns {any} */ import mockPort from "../../../demo/ext-app/mock/mockPort"; export function defaultAppContext(appContext) { const defaultAppContext = { port: mockPort() }; return Object.assign(defaultAppContext, appContext || {}); } /** * Default props */ export function defaultProps() { return {}; } /** * Returns the default administration context for the unit test * @param context An existing administration context * @returns {object} */ export function defaultAdministrationWorkspaceContext(context = {}) { const defaultContext = { must: { editSubscriptionKey: false, refreshSubscriptionKey: false }, onResetActionsSettings: jest.fn() }; return Object.assign(defaultContext, context); }