Blog Archives

JavaScript coverage with Istanbul and Coveralls via Travis CI

Components used: Mocha, Istanbul, Coveralls, Travis, node coveralls, make Since then I’ve been looking for alternatives to using JS Coverage for doing coverage instrumentation. There are two main issues with it: It’s C component that needs to be (sort of

Tagged with: , , , , ,
Posted in git, github, JavaScript, nodejs, TDD

GitAll to mange your GitHub repositories

Do you work with multiple GitHub repositories over multiple user or organisation accounts? Ever wanted to clone or update all your GitHub repositories with one command? Then GitAll is the tool for you. You can get it from GitHub here. GitAll

Posted in cloning, git, github, nodejs, repositories

Integration testing node.js web apps with JavaScript

These are some loose guidelines for integration testing a web app in JavaScript. Ideal if you need to test an ExpressJS app or any kind of web service. The key issue is being able to stop and start the service

Tagged with: , , ,
Posted in Uncategorized

Automated JavaScript testing with Mocha and js-coverage for NodeJS

I used to extensively use Jamine and Jasmine-Node for my JavaScript testing. While jasmine is great I’ve recently moved over to Mocha for several reasons but primarily because it supports coverage reporting. Here are some basic steps to get going.

Tagged with:
Posted in JavaScript, nodejs, programming, TDD, testing

Node.js configuration for session with redis edit

   

Posted in Uncategorized

XML find and change node script

This is a script written in ruby designed to find a specified node in an XML file, and replace one value with another. Usage example: changenode /home/me/foo bar.xml name bob john will find all ‘name’ nodes in bar.xml and replace

Tagged with: , , ,
Posted in programming, scripts

JavaScript Map object implementation

The idea of this object is to mimic the API of the Map object in Java. It can be used in the following way: I know this behaviour can also be attained by using an array in the following manner:

Tagged with: ,
Posted in programming