build-system/tasks/runtime-test.js
/**
 * Prints help messages for args if tests are being run for local development.
 */
Prints help messages for args if tests are being run for local development.
Prints help messages for args if tests are being run for local development .
function printArgvMessages() {
  const argvMessages = {
    safari: 'Running tests on Safari.',
    firefox: 'Running tests on Firefox.',
    ie: 'Running tests on IE.',
    edge: 'Running tests on Edge.',
    saucelabs: 'Running tests on Sauce Labs.',
    nobuild: 'Skipping build.',
    watch: 'Enabling watch mode. Editing and saving a file will cause the' +
        ' tests for that file to be re-run in the same browser instance.',
    verbose: 'Enabling verbose mode. Expect lots of output!',
    testnames: 'Listing the names of all tests being run.',
    files: 'Running tests in the file(s): ' + cyan(argv.files),
    integration: 'Running only the integration tests. Requires ' +
        cyan('gulp build') +  ' to have been run first.',
    unit: 'Running only the unit tests. Requires ' +
        cyan('gulp css') +  ' to have been run first.',
    randomize: 'Randomizing the order in which tests are run.',
    a4a: 'Running only A4A tests.',
    seed: 'Randomizing test order with seed ' + cyan(argv.seed) + '.',
    compiled:  'Running tests against minified code.',
    grep: 'Only running tests that match the pattern "' +
        cyan(argv.grep) + '".'
  };
  if (!process.env.TRAVIS) {
    util.log(green('Run', cyan('gulp help'),
        'to see a list of all test flags. (Use', cyan('--nohelp'),
        'to silence these messages.)'));
    if (!argv.unit && !argv.integration && !argv.files) {
      util.log(green('Running all tests. Use',
          cyan('--unit'), 'or', cyan('--integration'),
          'to run just the unit tests or integration tests.'));
    }
    if (!argv.compiled) {
      util.log(green('Running tests against unminified code.'));
    }
    Object.keys(argv).forEach(arg => {
      const message = argvMessages[arg];
      if (message) {
        util.log(yellow('--' + arg + ':'), green(message));
      }
    });
  }
}
function printArgvMessages ( ) { const argvMessages = { safari : 'Running tests on Safari.' , firefox : 'Running tests on Firefox.' , ie : 'Running tests on IE.' , edge : 'Running tests on Edge.' , saucelabs : 'Running tests on Sauce Labs.' , nobuild : 'Skipping build.' , watch : 'Enabling watch mode. Editing and saving a file will cause the' + ' tests for that file to be re-run in the same browser instance.' , verbose : 'Enabling verbose mode. Expect lots of output!' , testnames : 'Listing the names of all tests being run.' , files : 'Running tests in the file(s): ' + cyan ( argv . files ) , integration : 'Running only the integration tests. Requires ' + cyan ( 'gulp build' ) + ' to have been run first.' , unit : 'Running only the unit tests. Requires ' + cyan ( 'gulp css' ) + ' to have been run first.' , randomize : 'Randomizing the order in which tests are run.' , a4a : 'Running only A4A tests.' , seed : 'Randomizing test order with seed ' + cyan ( argv . seed ) + '.' , compiled : 'Running tests against minified code.' , grep : 'Only running tests that match the pattern "' + cyan ( argv . grep ) + '".' } ; if ( ! process . env . TRAVIS ) { util . log ( green ( 'Run' , cyan ( 'gulp help' ) , 'to see a list of all test flags. (Use' , cyan ( '--nohelp' ) , 'to silence these messages.)' ) ) ; if ( ! argv . unit && ! argv . integration && ! argv . files ) { util . log ( green ( 'Running all tests. Use' , cyan ( '--unit' ) , 'or' , cyan ( '--integration' ) , 'to run just the unit tests or integration tests.' ) ) ; } if ( ! argv . compiled ) { util . log ( green ( 'Running tests against unminified code.' ) ) ; } Object . keys ( argv ) . forEach ( arg => { const message = argvMessages [ arg ] ; if ( message ) { util . log ( yellow ( '--' + arg + ':' ) , green ( message ) ) ; } } ) ; } }
Prints help messages for args if tests are being run for local development.
Prints help messages for args if tests are being run for local development .