-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests - worth updating to follow the dojo conversion #15
Comments
To be honest, there shouldn't be a need for services for this project. It would, however, be useful to set up either a mock async store or a |
About services, agree and disagree, the problem is intern doesn't do stubs/mocking etc yet so you need to build something yourself. |
I too definitely want the shell scripts (runsauce.sh) converted into grunt tasks (for both delite and deliteful), please take that on. I thought the test directory structure for deliteful just got updated to match dojo, but maybe not. As for services, I agree eventually we will want them (but they don't need to be part of this ticket). I think @bryanforbes is forgetting about widgets like ComboBox, and the need to test what happens when the user types more characters before an XHR completes. See https://github.com/dojo/dijit/blob/master/tests/form/robot/_autoComplete_a11y.html#L691. Of course we can still use PHP to test that, but going full javascript would be a bit better. |
@lbod There is no need for intern to "do stubs/mocking" since Dojo provides a store API to program to and a request API that can be mocked. @wkeese I'm not forgetting about that use case at all. In fact, by using a |
Yes the deliteful structure is probably very similar to dojo now. I guess what is missing is the delite one. |
PS: See ibm-js/sdk#2 for our discussion of the directory structure @bryanforbes: OK understood about dojo/request, although I can't guarantee that we will end up running on top of dojo core. But regardless, I guess you are right that a delayed XHR can be simulated by stub code running in the browser. I suppose that's better than going over the wire since the timing is more consistent. |
@bryanforbes this is a completely separate discussion but a |
@lbod All the provider needs to do is define a The naming convention we've used for the intern conversion for Dojo is to name the test suite after the module name. Test names should either be what feature a test is testing or the name of the function or method being tested. If the test is testing a function, prepend a |
And offline discussion with @lbod and a fiddle later and I've come up with an example of mocking an asynchronous request using the This was quick and dirty, so YMMV if you use this as is. |
Conversion from shell scripts (runsauce.sh etc.) to using grunt is blocked by theintern/intern#139. |
Fix excludeInstrumentation setting. Note: directory structure / file names not updated to match dojo. Refs #15, ibm-js/sdk#2 sort-of.
theintern/intern@01da2eb has fixed theintern/intern#139 so I've raised a separate issue for grunt tasks in ibm-js/delite#110 |
Fix excludeInstrumentation setting. Note: directory structure / file names not updated to match dojo. Refs #15, ibm-js/sdk#2 sort-of.
Fix excludeInstrumentation setting. Note: directory structure / file names not updated to match dojo. Refs ibm-js#15, ibm-js/sdk#2 sort-of.
It'd be worth following what @bryanforbes has been doing at https://github.com/bryanforbes/dojo/tree/intern-conversion/tests-intern and using a similar grunt and test file structure (maybe even the services JSGI 'middleware')
I don't mind taking this on
The text was updated successfully, but these errors were encountered: