hadron-spectron
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');
const ROOT = path.join(__dirname, '..', '..', '..');
function addCustomCommands(client) {
}
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