lib/util.js
/**
 * Adds the metaData JSON to combined.json
 * combined.json is a JSON list, containing all metaData.
 * @param metaData the metaData to add to the combined JSON list
 * @param baseName
 * @param descriptions
 * @param options
 */
Adds the metaData JSON to combined.json
combined.json is a JSON list, containing all metaData.
@param metaData the metaData to add to the combined JSON list
@param baseName
@param descriptions
@param options
Adds the metaData JSON to combined . json combined . json is a JSON list containing all metaData . @param metaData the metaData to add to the combined JSON list @param baseName @param descriptions @param options
function addMetaData(test, baseName, options){
    var json,
        basePath = path.dirname(baseName),
        jsonsDirectory = path.join(basePath,'jsons'),
        file = path.join(basePath,'combined.json'),
        data = [];
    try {
        if (fse.pathExistsSync(file)) {
            data = JSON.parse(fse.readJsonSync(file), {encoding: 'utf8'});
        } else {
            fse.ensureFileSync(file);
            fse.outputJsonSync(file, CircularJSON.stringify([]));
            data = JSON.parse(fse.readJsonSync(file), {encoding: 'utf8'});
        }
        data.push(test);
        fse.outputJsonSync(file, CircularJSON.stringify(data));
    } catch(e) {
        console.error(e);
        console.error('Could not save JSON for data: ' + test);
    }
    addHTMLReport(data, baseName, options);
}
function addMetaData ( test , baseName , options ) { var json , basePath = path . dirname ( baseName ) , jsonsDirectory = path . join ( basePath , 'jsons' ) , file = path . join ( basePath , 'combined.json' ) , data = [ ] ; try { if ( fse . pathExistsSync ( file ) ) { data = JSON . parse ( fse . readJsonSync ( file ) , { encoding : 'utf8' } ) ; } else { fse . ensureFileSync ( file ) ; fse . outputJsonSync ( file , CircularJSON . stringify ( [ ] ) ) ; data = JSON . parse ( fse . readJsonSync ( file ) , { encoding : 'utf8' } ) ; } data . push ( test ) ; fse . outputJsonSync ( file , CircularJSON . stringify ( data ) ) ; } catch ( e ) { console . error ( e ) ; console . error ( 'Could not save JSON for data: ' + test ) ; } addHTMLReport ( data , baseName , options ) ; }
Adds the metaData JSON to combined.json
 combined.json is a JSON list, containing all metaData.
Adds the metaData JSON to combined . json combined . json is a JSON list containing all metaData .
//concat all tests