e2e/shared/common.js
function prepareBuild(config) {

  function serve(exitCode) {

    // Save our exitCode for testing
    _exitCode = exitCode;

    // Reset skyuxconfig.json
    resetConfig();

    return server.start('unused-root', tmp)
      .then(port => browser.get(`https://localhost:${port}/dist/`));
  }

  writeConfig(config);

  return new Promise((resolve, reject) => {
    rimrafPromise(path.join(tmp, 'dist'))
      .then(() => exec(`node`, [cliPath, `build`, `--logFormat`, `none`], cwdOpts))
      .then(serve)
      .then(resolve)
      .catch(err => reject(err));
  });
}
function prepareBuild(config) {

  function serve(exitCode) {

    // Save our exitCode for testing
    _exitCode = exitCode;

    // Reset skyuxconfig.json
    resetConfig();

    return server.start('unused-root', tmp)
      .then(port => browser.get(`https://localhost:${port}/dist/`));
  }

  writeConfig(config);

  return new Promise((resolve, reject) => {
    rimrafPromise(path.join(tmp, 'dist'))
      .then(() => exec(`node`, [cliPath, `build`, `--logFormat`, `none`], cwdOpts))
      .then(serve)
      .then(resolve)
      .catch(err => reject(err));
  });
}
function prepareBuild ( config ) { function serve ( exitCode ) { // Save our exitCode for testing _exitCode = exitCode ; // Reset skyuxconfig.json resetConfig ( ) ; return server . start ( 'unused-root' , tmp ) . then ( port => browser . get ( ` ${ port } ` ) ) ; } writeConfig ( config ) ; return new Promise ( ( resolve , reject ) => { rimrafPromise ( path . join ( tmp , 'dist' ) ) . then ( ( ) => exec ( ` ` , [ cliPath , ` ` , ` ` , ` ` ] , cwdOpts ) ) . then ( serve ) . then ( resolve ) . catch ( err => reject ( err ) ) ; } ) ; }
Run build given the following skyuxconfig object.
Starts server and resolves when ready.
Run build given the following skyuxconfig object . Starts server and resolves when ready .