Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// the child process needs to be sent some metadata to start.
// see: https://gist.github.com/lightsofapollo/6042626#file-host-api-js-L7
// this is the metadata
var metadata = {
host: 'firefox'
};
// runs
marionette('some test', { host: ['firefox', 'b2g-desktop'] }, function() {
});
// does not run
marionette('some test', { host: ['device'] }, function() {
});
// runs
marionette('some test', { host: 'firefox' }, function() {
});
// runs
marionette('everything', function() {
});
/**
the final argument of the test will be put into a "suite"
for example the final example would be converted to:
suite('everything', function() {
});
*/
@ganesh7

This comment has been minimized.

Copy link

ganesh7 commented Jul 19, 2013

// Is this correct?

// this is the metadata
var metadata = {
host: ['firefox', 'device']
};

// runs
marionette('some test', { host: ['firefox', 'b2g-desktop'] }, function() {
});

// runs
marionette('some test', { host: ['device'] }, function() {
});

// runs
marionette('some test', { host: 'firefox' }, function() {
});

// runs
marionette('everything', function() {
});

/**
the final argument of the test will be put into a "suite"
for example the final example would be converted to:

suite('everything', function() {
});

*/

@ganesh7

This comment has been minimized.

Copy link

ganesh7 commented Jul 21, 2013

// in child process ///

var fs = require('fs');

// we need a file name
var filename = '';
var filepathname = __dirname+ filename;

var contents = fs.readFileSync(filepathname).toString();

var data = JSON.parse(contents);

var host = data.host;

// here we run tests depending on the host
runTests(host);

// I'm confused what to do at this point after the tests have been run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.