Given this format, '2017-05-01'
, I want the date of May 1, 2017
.
Continue reading “Why input string format matters for JavaScript (and moment.js) dates”
Given this format, '2017-05-01'
, I want the date of May 1, 2017
.
Continue reading “Why input string format matters for JavaScript (and moment.js) dates”
[ original gist 28 March 2013 ]
“If there are no tests, it does not work,” a former colleague said, who could have added, “whether your code or someone else’s.”
I’m not the first to say it but it needs re-stating: 3rd-party libraries are no guarantee that your code continues to behave as expected.
If one of the duties of your work is making sure you’re not introducing bloat or cruft or inefficiencies or bugs or unexpected behavior, then you’re cutting corners if you don’t have tests, whether you use 3rd-party code or not.
[ original gist 12 July 2013 ]
Instead of trying to extract a private function, we can rely on mocking/spying. This gist post shows how to use the Function()
constructor to replace an internal call so that we can mock, spy or stub.
Continue reading “Mocking – not testing – private functions in JavaScript”
[ original gist 4 AUG 2013 ]
Text below is not my own; it is copied from a comment on Cedric Beust’s blog at
http://beust.com/weblog/2006/06/07/agile-people-still-dont-get-it/#comment-8577
QUOTE
Continue reading “The Plus & Minus of TDD ~ a commenter’s great response to Cedric Beust.”
[ original gist 3 June 2013 ]
The point of agile is lost when teams fixate on roles and responsibilities. Fixed roles (“dev”, “qa”) harm you in the long run – and the long run is always up sooner than you think.
That’s a noisy prelude to my answer to the question: Should QA Write Unit Tests?
Continue reading “How well does TDD work when testers are writing the tests?”
[ original gist 4 Aug 2013 ~ short reply on LinkedIn, copied for posterity… ]
TDD for integration tests? YES, but for different reasons than “maintenance” or
“acceptance”…
In testing, there is test creation and test maintenance. You have to do both if
you want tests to serve you well. Same for any product or tool.
The following joke pokes fun at developers who de-couple things arbitrarily or incoherently.
[originally posted 2014-03-04]
Getting started with tests takes time because there are many small decisions to make. If you haven’t gone through the whole setup and evolution more than once or twice, it’s easy to get lost or just plain forget.
[originally posted 2013-08-11]
I used to maintain this blog on github using Hexo, a Node.js module supporting markdown. I’ve switched over to wordpress online once I found it supported markdown (in the Settings section) so I wouldn’t have to go through all the rebuilding and deploying for such simple things as fixing a typo.