All files / tests/bin testUtils.js

70.83% Statements 17/24
16.67% Branches 1/6
50% Functions 1/2
66.67% Lines 14/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 493x 3x     3x 3x   3x     3x           3x           3x                     3x 3x 3x                   3x 3x 3x  
import { createRnvConfig, generateBuildConfig } from '../../src/configTools/configParser';
import cli from '../../src/cli';
 
 
export const getConfig = (s) => {
    const argArray = s.split(' ');
 
    const cmd = argArray.shift();
    let subCmd;
 
  I  if (argArray[0]) {
        if (!argArray[0].startsWith('-')) {
            subCmd = argArray.shift();
        }
    }
 
    const c = createRnvConfig({
        command: cmd,
        subCommand: subCmd
    }, { process: true }, cmd, subCmd);
 
 
    argArray.forEach((v, i) => {
        switch (v) {
        case '-p':
            c.platform = argArray[i + 1];
            break;
        case '-t':
            c.target = argArray[i + 1];
            break;
        }
    });
 
    generateBuildConfig(c);
    console.log('JDLKJDKDJL', c.buildConfig);
    c.buildConfig = {
        defaults: {
            supportedPlatforms: ['ios', 'android', 'tizen', 'web', 'macos',
                'webos', 'tizenphone', 'tizenwatch', 'androidtv', 'androidwear',
                'firefoxtv', 'firefoxos']
        },
        defaultTargets: {},
        common: {}
    };
 
    console.log('JDLKJDKDJL2222', c.buildConfig);
    return c;
};