本文整理汇总了TypeScript中chalk.bold.dim方法的典型用法代码示例。如果您正苦于以下问题:TypeScript bold.dim方法的具体用法?TypeScript bold.dim怎么用?TypeScript bold.dim使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chalk.bold
的用法示例。
在下文中一共展示了bold.dim方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _drawUIDoneWithSkipped
private _drawUIDoneWithSkipped() {
this._pipe.write(CLEAR);
const numPass = this._countPaths - this._testAssertions.length;
let stats = chalk.bold.dim(
pluralize('snapshot', this._countPaths) + ' reviewed',
);
if (numPass) {
stats +=
', ' + chalk.bold.green(pluralize('snapshot', numPass) + ' updated');
}
if (this._skippedNum) {
stats +=
', ' +
chalk.bold.yellow(pluralize('snapshot', this._skippedNum) + ' skipped');
}
const messages = [
'\n' + chalk.bold('Interactive Snapshot Result'),
ARROW + stats,
'\n' + chalk.bold('Watch Usage'),
chalk.dim(ARROW + 'Press ') +
'r' +
chalk.dim(' to restart Interactive Snapshot Mode.'),
chalk.dim(ARROW + 'Press ') +
'q' +
chalk.dim(' to quit Interactive Snapshot Mode.'),
];
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
}
示例2: _drawUIProgress
private _drawUIProgress() {
this._clearTestSummary();
const numPass = this._countPaths - this._testAssertions.length;
const numRemaining = this._countPaths - numPass - this._skippedNum;
let stats = chalk.bold.dim(
pluralize('snapshot', numRemaining) + ' remaining',
);
if (numPass) {
stats +=
', ' + chalk.bold.green(pluralize('snapshot', numPass) + ' updated');
}
if (this._skippedNum) {
stats +=
', ' +
chalk.bold.yellow(pluralize('snapshot', this._skippedNum) + ' skipped');
}
const messages = [
'\n' + chalk.bold('Interactive Snapshot Progress'),
ARROW + stats,
'\n' + chalk.bold('Watch Usage'),
chalk.dim(ARROW + 'Press ') +
'u' +
chalk.dim(' to update failing snapshots for this test.'),
chalk.dim(ARROW + 'Press ') +
's' +
chalk.dim(' to skip the current test.'),
chalk.dim(ARROW + 'Press ') +
'q' +
chalk.dim(' to quit Interactive Snapshot Mode.'),
chalk.dim(ARROW + 'Press ') +
'Enter' +
chalk.dim(' to trigger a test run.'),
];
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
}
示例3:
export const print = (stream: NodeJS.WritableStream) => {
if (isInteractive) {
stream.write(chalk.bold.dim('Determining test suites to run...'));
}
};