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 8b9d5cd commit bba9adf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/unit/chai-subset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,25 @@ describe('circular objects', function() {
]
});
});
});

describe('comparison of non objects', function () {
it('should fail if actual subset is null', function () {
expect(null).to.not.containSubset({a: 1});
});

it('should fail if expected subset is not a object', function () {
expect({a: 1}).to.not.containSubset(null);
});

it('should not fail for same non-object (string) variables', function () {
expect('string').to.containSubset('string');
});
});

describe('assert style of test', function () {
it('should find subset', function () {
var assert = require('chai').assert;
assert.containSubset({a: 1, b: 2}, {a: 1});
});
});

0 comments on commit bba9adf

Please sign in to comment.