server: fixed breaking change from chalk update 1.0 -> 2.0

This commit is contained in:
Jennifer Shehane
2017-07-07 16:30:33 -04:00
parent 17777514cc
commit f63842200a
2 changed files with 4 additions and 2 deletions

View File

@@ -42,6 +42,7 @@
"devDependencies": {
"@cypress/bumpercar": "^1.0.6",
"@cypress/npm-run-all": "^4.0.4",
"ansi-styles": "^3.1.0",
"ascii-table": "0.0.9",
"babel-eslint": "^6.0.4",
"bluebird": "^3.4.5",

View File

@@ -1,5 +1,6 @@
require("../spec_helper")
style = require("ansi-styles")
chalk = require("chalk")
errors = require("#{root}lib/errors")
logger = require("#{root}lib/logger")
@@ -16,7 +17,7 @@ describe "lib/errors", ->
it "uses red by default", ->
err = errors.get("NOT_LOGGED_IN")
errors.log(err).then =>
red = chalk.styles.red
red = style.color.red
expect(@log).to.be.calledWithMatch(red.open)
expect(@log).to.be.calledWithMatch(red.close)
@@ -24,7 +25,7 @@ describe "lib/errors", ->
it "can change the color", ->
err = errors.get("DEV_NO_SERVER")
errors.log(err, "yellow").then =>
yellow = chalk.styles.yellow
yellow = style.color.yellow
expect(@log).to.be.calledWithMatch(yellow.open)
expect(@log).to.be.calledWithMatch(yellow.close)