diff --git a/package.json b/package.json index 3be7f71..07a82f8 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "devDependencies": { "broccoli-builder": "^0.18.0", "chai": "^3.2.0", - "expect.js": "^0.3.1", "mocha": "~3.0.2", "mocha-jshint": "2.3.1", "rimraf": "^2.3.2", diff --git a/tests/index.js b/tests/index.js index 6f41127..39126cf 100644 --- a/tests/index.js +++ b/tests/index.js @@ -3,7 +3,7 @@ var fs = require('fs'); var path = require('path'); var RSVP = require('rsvp'); -var expect = require('expect.js'); +var expect = require('chai').expect; var walkSync = require('walk-sync'); var broccoli = require('broccoli-builder'); var rimraf = RSVP.denodeify(require('rimraf')); @@ -421,7 +421,7 @@ describe('broccoli-funnel', function(){ files: ['anything'], include: ['*.txt'] }); - }).to.throwException('Cannot pass files option (array or function) and a include/exlude filter. You can only have one or the other'); + }).to.throw('Cannot pass files option (array or function) and a include/exlude filter. You can only have one or the other'); }); it('so error if `files` and `exclude` are set', function() { @@ -432,7 +432,7 @@ describe('broccoli-funnel', function(){ files: function() { return ['anything']; }, exclude: ['*.md'] }); - }).to.throwException('Cannot pass files option (array or function) and a include/exlude filter. You can only have one or the other'); + }).to.throw('Cannot pass files option (array or function) and a include/exlude filter. You can only have one or the other'); }); }); @@ -760,36 +760,36 @@ describe('broccoli-funnel', function(){ it('returns false if the path is included in an exclude filter', function() { node.exclude = [ /.foo$/, /.bar$/ ]; - expect(node.includeFile('blah/blah/blah.foo')).to.not.be.ok(); - expect(node.includeFile('blah/blah/blah.bar')).to.not.be.ok(); - expect(node.includeFile('blah/blah/blah.baz')).to.be.ok(); + expect(node.includeFile('blah/blah/blah.foo')).to.eql(false); + expect(node.includeFile('blah/blah/blah.bar')).to.eql(false); + expect(node.includeFile('blah/blah/blah.baz')).to.eql(true); }); it('returns true if the path is included in an include filter', function() { node.include = [ /.foo$/, /.bar$/ ]; - expect(node.includeFile('blah/blah/blah.foo')).to.be.ok(); - expect(node.includeFile('blah/blah/blah.bar')).to.be.ok(); + expect(node.includeFile('blah/blah/blah.foo')).to.eql(true); + expect(node.includeFile('blah/blah/blah.bar')).to.eql(true); }); it('returns false if the path is not included in an include filter', function() { node.include = [ /.foo$/, /.bar$/ ]; - expect(node.includeFile('blah/blah/blah.baz')).to.not.be.ok(); + expect(node.includeFile('blah/blah/blah.baz')).to.not.eql(true); }); it('returns true if no patterns were used', function() { - expect(node.includeFile('blah/blah/blah.baz')).to.be.ok(); + expect(node.includeFile('blah/blah/blah.baz')).to.eql(true); }); it('uses a cache to ensure we do not recalculate the filtering on subsequent attempts', function() { - expect(node.includeFile('blah/blah/blah.baz')).to.be.ok(); + expect(node.includeFile('blah/blah/blah.baz')).to.eql(true); // changing the filter mid-run should have no result on // previously calculated paths node.include = [ /.foo$/, /.bar$/ ]; - expect(node.includeFile('blah/blah/blah.baz')).to.be.ok(); + expect(node.includeFile('blah/blah/blah.baz')).to.eql(true); }); });