开发者

Mocking Javascript objects (specifically YUI)

开发者 https://www.devze.com 2023-01-18 02:24 出处:网络
I\'m trying to mock YUI for javascript testing. I want to mock a datatable, but im not sure how to do it.

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

精彩评论

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