How to use the figures.cross function in figures

To help you get started, we’ve selected a few figures 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 avajs / ava / lib / cli.js View on Github external
function exit(message) {
	console.error(`\n  ${require('./chalk').get().red(figures.cross)} ${message}`);
	process.exit(1); // eslint-disable-line unicorn/no-process-exit
}
github avajs / ava / test / integration / babel.js View on Github external
execCli(['es2015.js'], {dirname: `fixture/invalid-babel-config/${which}`}, (err, stdout, stderr) => {
			t.ok(err);

			let expectedOutput = '\n  ';
			expectedOutput += figures.cross + ' Unexpected Babel configuration for AVA.';
			expectedOutput += ` See https://github.com/avajs/ava/blob/v${pkg.version}/docs/recipes/babel.md for allowed values.`;
			expectedOutput += '\n';

			t.is(stderr, expectedOutput);
			t.end();
		});
	});
github findmypast-oss / jackal / cli / reporter / spec / process-test-output.js View on Github external
const testFail = (provider, consumer, name, error) => {
  const cross = `    ${figures.cross} `
  const message = `Test ${name} failed for ${consumer} against ${provider}\n`
  const errorDetails = `    ${error}`

  return chalk.red(`${cross}${message}${errorDetails}`)
}
github lirantal / dockly / widgets / containers / containerList.widget.js View on Github external
formatContainerStatus (status) {
    if (status.match(/^Up/)) {
      return status.replace(/Up/, figures.tick)
    }

    if (status.match(/^Exited \(\d+\)/)) {
      return status.replace(/^Exited \(\d+\)/, figures.cross)
    }

    return status
  }
github sverweij / dependency-cruiser / src / cli / formatMetaInfo.js View on Github external
function bool2Symbol(pBool) {
  return pBool ? chalk.green(figures.tick) : chalk.red(figures.cross);
}
github tommy351 / kosko / src / utils / log.ts View on Github external
color: Chalk;
  icon: string;
  verbose?: boolean;
}

const levelOptions: LevelOptions[] = [
  {
    level: Level.Debug,
    color: chalk.gray,
    icon: figures.bullet,
    verbose: true
  },
  { level: Level.Info, color: chalk.blue, icon: figures.info },
  { level: Level.Success, color: chalk.green, icon: figures.tick },
  { level: Level.Warn, color: chalk.yellow, icon: figures.warning },
  { level: Level.Error, color: chalk.red, icon: figures.cross }
];

const maxLevelLength = Math.max(
  ...levelOptions.map(getPrefix).map(stringWidth)
);

function getPrefix(opt: LevelOptions) {
  return `${opt.icon} ${opt.level}`;
}

function buildLogFunc(writer: Writable, opt: LevelOptions) {
  let prefix = getPrefix(opt);

  for (let i = prefix.length; i <= maxLevelLength; i++) {
    prefix += " ";
  }
github Codeception / CodeceptJS / lib / output.js View on Github external
failed(test) {
      print(`  ${colors.red.bold(`${figures.cross} FAILED`)} ${colors.grey(`in ${test.duration}ms`)}`);
      print();
    },
  },
github klaussinani / signale / src / types.js View on Github external
'use strict';
const figures = require('figures');

module.exports = {
  error: {
    badge: figures.cross,
    color: 'red',
    label: 'error',
    logLevel: 'error'
  },
  fatal: {
    badge: figures.cross,
    color: 'red',
    label: 'fatal',
    logLevel: 'error'
  },
  fav: {
    badge: figures('❤'),
    color: 'magenta',
    label: 'favorite',
    logLevel: 'info'
  },
  info: {
    badge: figures.info,
    color: 'blue',
    label: 'info',
    logLevel: 'info'
  },