Added unit test using nodeunit