Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function loadTestPlugins() {
loadPlugins();
return render();
}
function loadTestPlugins() {
loadPlugins();
return render();
}
function loadTestPlugins() {
loadPlugins();
return render();
}
function loadTestPlugins() {
loadPlugins();
return render(
<>
<div data-testid="previewMock">
);
}
</div>
async function loadTestPlugins() {
loadPlugins();
return renderAsync();
}
export function mockPlug(
slotName: string,
component: PlugComponentType
) {
const name = getNewPluginName();
const testPlugin = createPlugin({ name });
testPlugin.plug(slotName, component);
testPlugin.register();
}
export function getMethodsOf(
pluginName: Spec['name']
) {
const name = getNewPluginName();
createPlugin({ name }).register();
return getPluginContext(name).getMethodsOf(pluginName);
}
export function on(
pluginName: Spec['name'],
handlers: EventHandlers
) {
const name = getNewPluginName();
const testPlugin = createPlugin({ name });
testPlugin.on(pluginName, handlers);
testPlugin.register();
}