Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/externals/javelin/ext/view/__tests__/View.js
Show All 23 Lines | members : { | ||||
} | } | ||||
} | } | ||||
}); | }); | ||||
it('should by default render children that are passed in', function() { | it('should by default render children that are passed in', function() { | ||||
var t = new JX.TestView( | var t = new JX.TestView( | ||||
'', | '', | ||||
{}, | {}, | ||||
[new JX.TestView('Hey', {id: "child"}, [])] | [new JX.TestView('Hey', {id: 'child'}, [])] | ||||
); | ); | ||||
var result = JX.ViewRenderer.render(t); | var result = JX.ViewRenderer.render(t); | ||||
expect(JX.DOM.scry(result, 'span').length).toBe(1); | expect(JX.DOM.scry(result, 'span').length).toBe(1); | ||||
}); | }); | ||||
it('should fail sanely with a bad getAttr call', function() { | it('should fail sanely with a bad getAttr call', function() { | ||||
expect(new JX.TestView('', {}, []).getAttr('foo')).toBeUndefined(); | expect(new JX.TestView('', {}, []).getAttr('foo')).toBeUndefined(); | ||||
}); | }); | ||||
Show All 21 Lines |