How to use the buntstift.newLine function in buntstift

To help you get started, we’ve selected a few buntstift examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thenativeweb / roboter / test / helpers / createTestsForTask.js View on Github external
let pre;

        try {
          /* eslint-disable global-require */
          pre = require(path.join(cwd, task, testCase, 'pre.js'));
          /* eslint-enable global-require */
        } catch {
          pre = async function () {
            // Dummy method as fallback
          };
        }

        buntstift.line();
        buntstift.info(`${task} - ${testCase}`);
        buntstift.newLine();

        await pre({ dirname: tempTestDirectory });

        const result = await runRoboterTask({ cwd, task, directory: tempTestDirectory });

        /* eslint-disable global-require */
        const expected = require(path.join(cwd, task, testCase, 'expected.js'));
        /* eslint-enable global-require */

        assert.that(result.exitCode).is.equalTo(expected.exitCode);

        assert.that(result.stderr).is.containing(expected.stderr);

        const expectedStdouts = flatten([ expected.stdout ]);

        let previousIndex = -1;
github thenativeweb / roboter / bin / bot.js View on Github external
if (!fs.existsSync(path.join(process.cwd(), 'node_modules', 'roboter'))) {
  buntstift.error('roboter is not installed locally.');
  buntstift.newLine();
  buntstift.info('Please run the following command:');
  buntstift.newLine();
  buntstift.info('  npm install roboter --save-dev --save-exact');
  buntstift.exit(1);
}

const localRoboterPackageJson = require(path.join(
  process.cwd(), 'node_modules', 'roboter', 'package.json'));

if (semver.gt(localRoboterPackageJson.version, packageJson.version)) {
  buntstift.error('The roboter runner is too old.');
  buntstift.newLine();
  buntstift.info('Please run the following command:');
  buntstift.newLine();
  buntstift.info('  npm install -g roboter');
  buntstift.exit(1);
}

const gulp = path.join(process.cwd(), 'node_modules', '.bin', 'gulp');

if (!fs.existsSync(gulp)) {
  buntstift.error('gulp is not installed locally.');
  buntstift.newLine();
  buntstift.info('Please run the following command:');
  buntstift.newLine();
  buntstift.info('  npm install gulp --save-dev --save-exact');
  buntstift.exit(1);
}