开发者

Mocking Javascript objects (specifically YUI)

I'm trying to mock YUI for javascript testing. I want to mock a datatable, but im not sure how to do it.

Something like

 YAHOO.widget.DataTable = function(){

  };

so latter I could do some开发者_如何学Gothing like

   assert.that(returnedDatatable, isOfType(YAHOO.widget.DataTable));


My answer: js mockito or don't use YUI :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜