mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-15 03:31:18 -06:00
server: fixed breaking change from chalk update 1.0 -> 2.0
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user