File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 76747674 QUnit.test('should only add multiple values to own, not inherited, properties', function(assert) {
76757675 assert.expect(1);
76767676
7677- var expected = { 'hasOwnProperty ': ['a'] , 'constructor ': ['b'] },
7678- object = { 'a ': 'hasOwnProperty' , 'b ': 'constructor' };
7677+ var object = { 'a ': 'hasOwnProperty' , 'b ': 'constructor' },
7678+ expected = { 'hasOwnProperty ': ['a'] , 'constructor ': ['b'] };
76797679
76807680 assert.ok(lodashStable.isEqual(_.invertBy(object), expected));
76817681 });
7682+
7683+ QUnit.test('should return a wrapped value when chaining', function(assert) {
7684+ assert.expect(2);
7685+
7686+ if (!isNpm) {
7687+ var wrapped = _(object).invertBy();
7688+
7689+ assert.ok(wrapped instanceof _);
7690+ assert.deepEqual(wrapped.value(), { '1': ['a', 'c'], '2': ['b'] });
7691+ }
7692+ else {
7693+ skipAssert(assert, 2);
7694+ }
7695+ });
76827696 }());
76837697
76847698 /*--------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments