[ 
https://issues.apache.org/jira/browse/SHINDIG-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605397#action_12605397
 ] 

Brian Eaton commented on SHINDIG-383:
-------------------------------------

Re: constructor conversion: this was done to allow different values to be 
passed into gadgets.config.register.  Is there another way to do this?

Re: tests for getProxyUrl: My main goal here is to get us to a place where 
someone can write regression tests before they go hacking around in the code.  
Hopefully we'll someday reach a point where io.js has good test coverage, but 
that is going to depend on more people than just me.

Re: testing the IE 6 case: is there a meaningful way to do browser-specific 
testing in this code, given that the tests are going to run in a non-browser 
environment?  My approach to this would be to minimize the bits of code that 
are browser specific (e.g. the makeXhr function), and test those carefully by 
hand or in Selenium.  Sure someone could write tests that use 
window.ActiveXObject in Rhino, but it would give me zero confidence that the 
code keeps working in IE.

One spot where I'd like more feedback is on the mock XHR objects.  They 
currently work by checking for equality of requests based on the method, url, 
and form-encoded query and body arguments irrespective of order.  They are also 
strict mocks, in that they expect particular requests to occur exactly once in 
a particular order.  Is this a good place to start?  Is there more flexibility 
that is likely to be useful?

> unit tests for io.js
> --------------------
>
>                 Key: SHINDIG-383
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-383
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features (Javascript)
>            Reporter: Brian Eaton
>         Attachments: iotest.patch
>
>
> We should have unittests for io.js.  I've put together a (very rough) patch 
> for that based on a mocked out XMLHTTPRequest object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to