Update chalk to 2.x (#6003)

This commit is contained in:
Daniel Tschinder
2017-07-24 17:06:57 +02:00
committed by Henry Zhu
parent 9b04cbbc4f
commit 677160385c
3 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import assert from "assert";
import chalk from "chalk";
import stripAnsi from "strip-ansi";
import codeFrame, { codeFrameColumns } from "..";
describe("babel-code-frame", function() {
@@ -100,7 +101,7 @@ describe("babel-code-frame", function() {
it("opts.highlightCode", function() {
const rawLines = "console.log('babel')";
const result = codeFrame(rawLines, 1, 9, { highlightCode: true });
const stripped = chalk.stripColor(result);
const stripped = stripAnsi(result);
assert.ok(result.length > stripped.length);
assert.equal(
stripped,