Skip to content

Add helpers for testing Actions #17

@ioncreature

Description

@ioncreature

For actions:

const action = await broker.getActionWithMocks('actionName', {singletons, actions, plugins);
expect(action(params)).toBeSomething();

For singletons:

const singleton = await broker.getSingletonWithMocks('singletonName', {singletons});
expect(singleton).toBeSomething();

For plugins:

const plugin = await broker.getPluginWithMocks('pluginName', {singletons})
expect(plugin(params)).toBeSomething();

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestimportantThis has higher priority than other

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions