fixed tests for host that were too specific to begin with
This commit is contained in:
12
test/utils/expect_sub_object.js
Normal file
12
test/utils/expect_sub_object.js
Normal file
@ -0,0 +1,12 @@
|
||||
var _ = require('lodash-node');
|
||||
var expect = require('expect.js');
|
||||
module.exports = function expectSubObject(obj, subObj) {
|
||||
_.forOwn(subObj, function (val, prop) {
|
||||
if (typeof obj[prop] === 'object') {
|
||||
// non-strict equals
|
||||
expect(obj[prop]).to.eql(val, 'Expected property' + prop + ' of object to equal ' + val);
|
||||
} else {
|
||||
expect(obj).property(prop, val);
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user