VulpesOS/gaia/tests/jsmarionette/runner/marionette-js-runner/lib/optsfileparser.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

20 lines
437 B
JavaScript
Executable file

'use strict';
var debug = require('debug')('marionette-js-runner:optsfile'),
fs = require('fs');
/**
* Reads the contents of given opts file and returns an array.
*
* @param {String} file to load opts from.
* @return {Array} options.
*/
function loadOptsFile(file) {
debug('loading opts file', file);
var opts = fs.readFileSync(file, 'utf8')
.trim()
.split(/\s+/);
return opts;
}
module.exports = loadOptsFile;