Skip to content

Commit

Permalink
Merge pull request chaijs#14 from debitoor/v1.1.0
Browse files Browse the repository at this point in the history
v1.1.0 assert style of test, rm jshint, add jscs eslint, better coverage, fixes chaijs#13
  • Loading branch information
eagleeye authored and koddsson committed Aug 29, 2015
1 parent 21c9fbd commit 71b8eaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/chai-subset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function(chai, utils) {
var Assertion = chai.Assertion;
var assertionPrototype = Assertion.prototype;

Assertion.addChainableMethod('containSubset', function (expected) {
Assertion.addMethod('containSubset', function (expected) {
var actual = utils.flag(this, 'object');
var showDiff = chai.config.showDiff;

Expand All @@ -15,6 +15,10 @@ module.exports = function(chai, utils) {
showDiff
);
});

chai.assert.containSubset = function(val, exp, msg) {
new chai.Assertion(val, msg).to.be.containSubset(exp);
};
};

function compare(expected, actual) {
Expand Down

0 comments on commit 71b8eaf

Please sign in to comment.