Skip to content

Commit

Permalink
⬆️ bump chai devdep to ^2.0
Browse files Browse the repository at this point in the history
modify unit tests due to breaking changes from chai 1.10 -> 2.0
chaijs/chai#308
chaijs/chai#306
  • Loading branch information
koulmomo committed Feb 26, 2015
1 parent fe2cbc3 commit 90e5ec1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"async": "^0.9.0"
},
"devDependencies": {
"chai": "^1.10",
"chai": "^2.0",
"coveralls": "^2.11.1",
"istanbul": "^0.3.5",
"mocha": "^2.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('index', function () {
};

webpack(config, function (err, stats) {
expect(err).to.be.null();
expect(err).to.equal(null);
require([config.output.path, config.output.filename].join('/'));
done();
});
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/libs/continueOnError.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('continueOnError', function () {
it('should call callback with data if the returned function is passed data with no error', function (cb) {
var payload = 'actual data';
var callback = function (err, data) {
expect(err).to.be.null();
expect(err).to.equal(null);
expect(data).to.be.a('string').and.equal(payload);
cb();
};
Expand All @@ -22,7 +22,7 @@ describe('continueOnError', function () {
it('should call callback with data.err if the returned function is passed an error', function (cb) {
var error = { status: 404, message: 'Not Found'};
var callback = function (err, data) {
expect(err).to.be.null();
expect(err).to.equal(null);
expect(data).to.be.an('object').and.have.property('err', error);
cb();
};
Expand All @@ -34,7 +34,7 @@ describe('continueOnError', function () {
function (cb) {
var error = { status: 404, message: 'Not Found'};
var callback = function (err, data) {
expect(err).to.be.null();
expect(err).to.equal(null);
expect(data).to.be.an('object').and.have.property('error', error);
cb();
};
Expand Down
20 changes: 10 additions & 10 deletions tests/unit/libs/fluxible-action-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('fluxible-action-utils', function () {
var task = actionUtils.toAsyncTask(mockAction(mockError, undefined, mockParams), mockContext, mockParams);

task(function (err, data) {
expect(err).to.not.exist();
expect(err).to.not.exist;
expect(data).to.be.an('object').and.have.property('err', mockError);
done();
});
Expand Down Expand Up @@ -122,7 +122,7 @@ describe('fluxible-action-utils', function () {
};

actionUtils.executeMultiple(mockContext, tasks, function (err, results) {
expect(err).to.not.exist();
expect(err).to.not.exist;
expect(results).to.be.an('object').and.deep.equal({
foo: 'foo',
bar: 'bar',
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('fluxible-action-utils', function () {

function run (cb) {
actionUtils.executeMultiple(mockContext, tasks, function (err, results) {
expect(err).to.not.exist();
expect(err).to.not.exist;
expect(results).to.be.an('object').and.deep.equal({
foo: 'foo',
bar: 'bar',
Expand Down Expand Up @@ -203,13 +203,13 @@ describe('fluxible-action-utils', function () {
};

actionUtils.executeMultiple(mockContext, tasks, function (err, results) {
expect(err).to.exist().and.deep.equal({
expect(err).to.exist.and.deep.equal({
foo: mockError
});

expect(results).to.be.an('object').and.have.property('baz', 'baz');
expect(results).to.not.have.property('foo');
expect(results).to.not.have.property('bar');
expect(results.foo).to.not.be.ok;
expect(results.bar).to.not.be.ok;

done();
});
Expand Down Expand Up @@ -288,7 +288,7 @@ describe('fluxible-action-utils', function () {
};

actionUtils.executeCritical(mockContext, tasks, function (err, results) {
expect(err).to.not.exist();
expect(err).to.not.exist;
expect(results).to.be.an('object').and.deep.equal({
foo: 'foo',
bar: 'bar',
Expand Down Expand Up @@ -322,13 +322,13 @@ describe('fluxible-action-utils', function () {
};

actionUtils.executeCritical(mockContext, tasks, function (err, results) {
expect(err).to.exist().and.deep.equal({
expect(err).to.exist.and.deep.equal({
foo: mockError
});

expect(results).to.be.an('object').and.have.property('baz', 'baz');
expect(results).to.not.have.property('foo');
expect(results).to.not.have.property('bar');
expect(results.foo).to.not.be.ok;
expect(results.bar).to.not.be.ok;

done();
});
Expand Down

0 comments on commit 90e5ec1

Please sign in to comment.