mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 00:55:13 -07:00
test case for _.forOwn
This commit is contained in:
@@ -43,6 +43,11 @@ describe('util/underscore', function () {
|
|||||||
_.forOwn(obj, spy)
|
_.forOwn(obj, spy)
|
||||||
expect(spy).to.have.been.calledWith('bar', 'foo', obj)
|
expect(spy).to.have.been.calledWith('bar', 'foo', obj)
|
||||||
})
|
})
|
||||||
|
it('should default to empty object', function () {
|
||||||
|
var spy = sinon.spy()
|
||||||
|
_.forOwn(undefined, spy)
|
||||||
|
expect(spy).to.have.not.been.called
|
||||||
|
})
|
||||||
it('should not iterate over properties on prototype', function () {
|
it('should not iterate over properties on prototype', function () {
|
||||||
var spy = sinon.spy()
|
var spy = sinon.spy()
|
||||||
var obj = Object.create({
|
var obj = Object.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user