updating test templates to use IIFE wrappers
giving spies a name for better error feedback + minor variable name change #604
Merge pull request #956 from BladeRunnerJS/commonjs-test-iife

updating test templates to use IIFE wrappers