Ensure commit and reverse track __chain__` settings. [closes #958]

This commit is contained in:
jdalton
2015-02-11 08:29:01 -08:00
parent 37f711d72a
commit c44cd76c5a
2 changed files with 24 additions and 2 deletions

View File

@@ -14570,6 +14570,17 @@
skipTest(4);
}
});
test('should track the `__chain__` value of a wrapper', 2, function() {
if (!isNpm) {
var wrapper = _([1]).chain().commit().first();
ok(wrapper instanceof _);
strictEqual(wrapper.value(), 1);
}
else {
skipTest(2);
}
});
}());
/*--------------------------------------------------------------------------*/
@@ -14745,6 +14756,17 @@
skipTest(4);
}
});
test('should track the `__chain__` value of a wrapper', 2, function() {
if (!isNpm) {
var wrapper = _([1, 2, 3]).chain().reverse().first();
ok(wrapper instanceof _);
strictEqual(wrapper.value(), 3);
}
else {
skipTest(2);
}
});
}());
/*--------------------------------------------------------------------------*/