Created
July 19, 2013 22:27
-
-
Save lightsofapollo/6042786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() { | |
}); | |
*/ |
// 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
// 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() {
});
*/