Posts tagged "testing"

Found 9 posts tagged testing

How to test a function that works with time

Published on
#javascript #nodejs #testing #programming 

While building Minimal Analytics I had the need to test a function that was dependent on time.

In my case, the function returned the milliseconds until midnight.

Here is a simple way to test the function msUntilMidnight.

Read more

Test driving a HackerNews scraper with Node.js

This is a short summary of my experience while writing a simple HackerNews scraper.

As a pure exercise or kata if you want, I tried to apply Clean code, Refactoring and Testing priciples for this small npm module.

The task is simple:

Get the posts on the front page of and parse them.

Read more

Validate your RSS feed

Published on
#rss #testing #CI #blogging 

Today a dear user made me aware that my RSS feed broke. There was a XML Parsing Error for

ASAP after work I checked the validity through and in fact there were some issues with it.

Read more

Always $digest after you expect

Published on
#angularjs #javascript #testing #programming 

Angular`s digest loop is like a baby: you need to take care of it and feed it well, or it will puke all over your nice shirt. Actually, it will probably, eventually do it anyway.

Read more