Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Chalk 1.1.1
Fix tests for chalk 1

Update dev dependencies
  • Loading branch information
dfreedm committed Nov 18, 2015
1 parent 091282d commit 29cd53a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
},
"homepage": "https://github.com/PolymerLabs/stacky",
"devDependencies": {
"chai": "^1.9.1",
"chai": "^3.4.1",
"event-stream": "^3.1.7",
"gulp": "^3.8.7",
"gulp-coverage": "^0.2.26",
"gulp-coverage": "^0.3.38",
"gulp-coveralls": "^0.1.2",
"gulp-jshint": "^1.8.4",
"gulp-mocha": "^1.0.0",
"gulp-notify": "^1.5.0",
"gulp-plumber": "^0.6.5",
"gulp-watch": "^0.6.9",
"jshint-stylish": "^0.4.0",
"lazypipe": "^0.2.2",
"mocha": "^1.21.4"
"gulp-mocha": "^2.2.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.0.1",
"gulp-watch": "^4.3.5",
"jshint-stylish": "^2.1.0",
"lazypipe": "^1.0.1",
"mocha": "^2.3.4"
},
"dependencies": {
"chalk": "^0.5.1",
"chalk": "^1.1.1",
"lodash": "^3.0.0"
}
}
17 changes: 6 additions & 11 deletions test/formatting.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,31 @@ describe('formatting', function() {
describe('.pretty', function() {
var pretty = formatting.pretty;

beforeEach(function() {
chalk.enabled = false;
});

it('lines up methods', function() {
expect(pretty(
expect(chalk.stripColor(pretty(
'short@bar.js:1:2\n' +
'pretty damn long@bar.js:3:4\n' +
'sorta long@bar.js:5:6'
)).to.deep.eq(
))).to.deep.eq(
' short at bar.js:1:2\n' +
'pretty damn long at bar.js:3:4\n' +
' sorta long at bar.js:5:6'
);
});

it('honors maxMethodPadding', function() {
expect(pretty(
expect(chalk.stripColor(pretty(
'short@bar.js:1:2\n' +
'pretty damn long@bar.js:3:4\n' +
'sorta long@bar.js:5:6',
{maxMethodPadding: 10})).to.deep.eq(
{maxMethodPadding: 10}))).to.deep.eq(
' short at bar.js:1:2\n' +
'pretty damn long at bar.js:3:4\n' +
'sorta long at bar.js:5:6'
);
});

it('honors chalk.enabled', function() {
chalk.enabled = true;
expect(pretty(
'short@bar.js:1:2\n' +
'pretty damn long@baz.js:3:4\n' +
Expand All @@ -65,10 +60,10 @@ describe('formatting', function() {
});

it('replaces missing methods', function() {
expect(pretty(
expect(chalk.stripColor(pretty(
'@bar.js:1:2\n' +
'thing@bar.js:3:4\n',
{maxMethodPadding: 10})).to.deep.eq(
{maxMethodPadding: 10}))).to.deep.eq(
'<unknown> at bar.js:1:2\n' +
' thing at bar.js:3:4'
);
Expand Down
17 changes: 10 additions & 7 deletions test/normalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ describe('normalization', function() {
describe('.normalize', function() {
var normalize = normalization.normalize;

beforeEach(function() {
chalk.enabled = false;
});

it('hides columns by default', function() {
expect(normalize(FULL_ERROR)).to.deep.equal({
var err = normalize(FULL_ERROR);
err.stack = chalk.stripColor(err.stack);
expect(err).to.deep.equal({
message: 'ReferenceError: FAIL is not defined',
stack: 'ReferenceError: FAIL is not defined\n' +
' Constraint.execute at deltablue.js:525\n' +
Expand All @@ -55,7 +53,9 @@ describe('normalization', function() {
});

it('supports modern errors', function() {
expect(normalize(FULL_ERROR, {showColumns: true})).to.deep.equal({
var err = normalize(FULL_ERROR, {showColumns: true});
err.stack = chalk.stripColor(err.stack);
expect(err).to.deep.equal({
message: 'ReferenceError: FAIL is not defined',
stack: 'ReferenceError: FAIL is not defined\n' +
' Constraint.execute at deltablue.js:525:2\n' +
Expand Down Expand Up @@ -87,7 +87,10 @@ describe('normalization', function() {
columnNumber: 27,
};

expect(normalize(error, {showColumns: true})).to.deep.equal({
var err = normalize(error, {showColumns: true});
err.stack = chalk.stripColor(err.stack);

expect(err).to.deep.equal({
message: 'Something brokeded',
stack: 'Something brokeded\n' +
'<unknown> at some/file.js:123:27',
Expand Down

0 comments on commit 29cd53a

Please sign in to comment.