Closed jbadeau closed 9 years ago
Hey @jbadeau, this really looks like great stuff, and is also somewhat in line with other test DSL extensions, like those in chai-as-promised for example.
I would absolutely love to find the right way to integrate wire into the test process, ie with the ability to mock certain components, etc etc. Looking at your gist, it seems like that's exactly what you're thinking!
Have you done any experiments with coding any of this to make it work yet? Where would you like to go with it from here?
I started working on an implementation this week.
You could really help out by pointing me to cujojs test cases that you either found difficult to implement or needed allot of boilerplate (mocking, spying, async, setup, etc).
Cheers
Was not an issue. Just a nite. Moste of this stuff is implemented in intern
Thanks @jbadeau. That's cool that you're using Intern.
yes its very nice, only thing I really miss from karma is it's ability to relaunch after a browser crash.
Hi Guys,
Just brainstorming a bit here. So after having developed a large and highly async SPA I feel the current stack of HTML5 + CujoJs is really productive. Howeve; I have found unit testing my moduals to be pretty cumbersome. Whereas SPA frameworks have realized great benefits from applying techniques like dependency-injection, aspect oriented programming, observables and promises; testing rarely if ever takes advantages of them.
For instance I often see test code like:
or
I find then not only unintuitive to write but also hard to read.
However; with a bit of help with our friends mr promise and mrs observe we can transform them to this.
or
These are just a few examples of how techniques applied to SPA can be used in teh testing contest.
Please note this is just an idea any positive or negative comments are welcome.
The main areas of concern are:
A small gist of my idea and possible API is here: https://gist.github.com/jbadeau/9911863
I am posting here as my intended libs to use are wire, meld, when and possibly cola