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

Kevin Brown 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? "

You can call config.init multiple times to reset configuration if you need it 
to vary for some reason.

"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. "

We should never write "browser specific" code, rather "feature specific" code, 
so that's what we test.

I don't think the XHR mocks need to be strict (but I think strict mocks are 
overused anyway; it's pretty rare for the order of execution to actually 
matter). 


> 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