Add test case

Add some test case in push cordova project using nodeunit.
What's the meaning for this group of code? Any reference link for example?