UNPKG

@badeball/cypress-cucumber-preprocessor

Version:

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

28 lines (27 loc) 948 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.useColors = void 0; const chalk_1 = __importDefault(require("chalk")); /** * Copied from Cypress [1] as this isn't exposed. * * [1] https://github.com/cypress-io/cypress/blob/v12.13.0/cli/lib/util.js#L348-L363 */ function useColors() { // if we've been explictly told not to support // color then turn this off if (process.env.NO_COLOR) { return false; } // https://github.com/cypress-io/cypress/issues/1747 // always return true in CI providers if (process.env.CI) { return true; } // ensure that both stdout and stderr support color return Boolean(chalk_1.default.supportsColor) && Boolean(chalk_1.default.stderr.supportsColor); } exports.useColors = useColors;