From 10f10ee1896efdcc16315e10daba4ca7e27e3dd9 Mon Sep 17 00:00:00 2001 From: Robin Cussol Date: Tue, 29 Oct 2019 01:53:30 +0100 Subject: [PATCH] test: cover missing filter arg in obj-filter (#1467) --- test/obj-filter.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/obj-filter.js diff --git a/test/obj-filter.js b/test/obj-filter.js new file mode 100644 index 000000000..4dd79f128 --- /dev/null +++ b/test/obj-filter.js @@ -0,0 +1,16 @@ +'use strict' +/* global describe, it */ + +const objFilter = require('../lib/obj-filter') + +require('chai').should() + +describe('ObjFilter', () => { + it('returns a new reference to the original object if no filter function is given', () => { + const original = { foo: 'bar', baz: 'foo' } + const result = objFilter(original) + + original.should.not.equal(result) + original.should.deep.equal(result) + }) +})