Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meteor-desktop-plugin-test-suite

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meteor-desktop-plugin-test-suite

Few utils to ease out functional testing of Meteor Desktop plugins.

  • 0.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Meteor Desktop Plugin Test Suite

Few utils to ease out functional testing of Meteor Desktop plugins.

getElectronPath

Returns path to electron bin.

createTestApp(installPath, pluginName)

Creates a test app with the your plugin included.

/**
 * @param {string} installPath - Path at which to install the app.
 * @param {string} pluginName - Name of the npm package (plugin) you are testing.
 * @returns {Promise}
 */

The test app provides two methods accessible through IPC.

  • constructPlugin params log, app, appSettings, eventsBus, modules, settings

It is just constructing your plugin. Pass undefined if your plugin does not use certain param.

  • fireSystemEvent params systemEvent, ...args

Fires an system event, so you can simulate a systemEvent on which you plugin is listening. You need to pass undefined as systemEvents params to make this work.

sendIpc(app, ...args)

Sends an IPC message to the main process.

/**
 * @param {Object} app - The app ref from Spectron.
 * @param {Array} args - Array of arguments to pass to ipc.send.
 * @returns {*}
 */

sendModuleEvent(app, module, event, ...args)

Sends an IPC event to your module. Use if your plugin/module registers itself via let module = new Module('myModuleName').

/**
 * @param {Object} app - The app ref from Spectron.
 * @param {string} module - The module name your plugin is registerting.
 * @param {string} event - Event from your module.
 * @param {Array} args - Array of arguments to pass to ipc.send.
 */

class Logger(show, showErrors)

Fake logger that eventually can write the logs to the console. You can set show to false and showErrors to true to only see errors passed to it.

Example

An example of usage in tests is here meteor-desktop-splash-screen

Keywords

FAQs

Package last updated on 25 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc