hadron-spectron

5.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i hadron-spectron

Weekly Downloads

0

Version

5.0.0

License

Apache-2.0

Unpacked Size

19.4 kB

Total Files

17

Last publish

Collaborators

  • orechova
  • himanshusinghs
  • c-buckingham
  • mongo-j
  • mabaasit
  • alexander_schroll
  • chuck.kalmanek
  • mongodb-js-user
  • rueckstiess
  • durran
  • lerouxb
  • fredtruman
  • mbroadst
  • hswolff
  • satyasinha
  • matt_d_rat
  • rhysm
  • tomhollander
  • alena.khineika
  • jeff-allen-mongo
  • mmarcon
  • jonathan.balsano
  • mongodb-build
  • jack.weir
  • stennie
  • mcasimir
  • kristina.stefano
  • jarjee
  • shaketbaby
  • devtoolsbot
  • addaleax
  • gribnoysup
  • mutukrish