testdouble / discovery-testing Goto Github PK
View Code? Open in Web Editor NEWA little example of discovery testing with mocks in node.
A little example of discovery testing with mocks in node.
I want to share a couple of thoughts on the screencast. Justin asked me to use GitHub issues instead of email so other people can see it. Here it goes.
First of all, I use mocks and I use a similar style of TDD. This is not criticism – I often use the GOOS approach. I just want to discuss some fine points.
That being said, I think I say that because of the example – it is quite simple and it does not illustrate the pragmatic benefit of this approach. I think a different example will do better – maybe one that has to integrate with a couple of messy collaborators or one where having those tests helps us spot introducing a bad design decision.
By the way, I don't see much value in test-driving code with isolated collaborators (think Rails controllers). I still do it anyway, since I get value afterwards. Whenever I add code to the controller, I find that the existing tests help me think about the effect of the addition. Fox example, it helps me spot if I introduce a needless collaborator or if I introduce too much coupling. Otherwise I tend to get sloppy in those bits since they are small and understandable enough.
Finally, I really liked the idea about rewriting code vs. reusing. I'm trying to think about a good formulation that doesn't seem too outrageous.
Hope this is useful :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.