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

hadron-spectron

Package Overview
Dependencies
Maintainers
33
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hadron-spectron

Hadron Spectron Test Support

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by20%
Maintainers
33
Weekly downloads
 
Created
Source

hadron-spectron Linux CI Windows CI

Installation

npm install --save-dev hadron-spectron

Usage

With Mocha, create an App instance in the before hook and launch it, and quit it in the after hook. For examples and more details, see Compass' functional test README.

const { App, selector } = require('hadron-spectron');

/**
 * The path to the root of the application, as well as the electron app.
 */
const ROOT = path.join(__dirname, '..', '..', '..');

function addCustomCommands(client) {
  // Add custom commands to the client here.
}

function launchApp() {
  return new App(ROOT).launch(addCustomCommands);
}

function quitApp() {
  return app.quit();
}

describe('Functional Test', function() {
  let app = null;
  let client = null;

  before(function() {
    return launchApp().then(function(application) {
      app = application;
      client = application.client;
    });
  });

  after(function() {
    return quitApp(app);
  });
});

chai-as-promised support is provided automatically as a convenience.

License

Apache 2.0

Keywords

FAQs

Package last updated on 07 Nov 2018

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