* switch from custom eslint config to standard + prettier * fix new standard eslint violations * add editorconfig file * auto-fix all other violations * update lint yarn script * remove jshint comment
16 lines
415 B
JavaScript
16 lines
415 B
JavaScript
var _ = require('lodash');
|
|
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);
|
|
}
|
|
});
|
|
};
|