Test program for module design in javascript