File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 7674
7674
QUnit.test('should only add multiple values to own, not inherited, properties', function(assert) {
7675
7675
assert.expect(1);
7676
7676
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'] };
7679
7679
7680
7680
assert.ok(lodashStable.isEqual(_.invertBy(object), expected));
7681
7681
});
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
+ });
7682
7696
}());
7683
7697
7684
7698
/*--------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments