1.0.3 • Published 10 years ago
karma-es6-shim-example v1.0.3
karma-es6-shim-example
This is simply to show how to use https://github.com/radify/karma-es6-shim to get Karma unit tests working with ES6 code, PhantomJS and Require.
Installation
npm installRunning the tests
gulpWhat's what?
Gulpfile.js- automation script using the Gulp streaming build system. This compiles the code to ES5 and also runs the tests.src/Example.js- a basic object that we can testsrc/ExampleController.js- an AngularJS controller that we can testspec/karma.conf.js- configuration for the Karma test runnerspec/test-main.js- configuration for Require so that theimportstatements work correctlyspec/ExampleSpec.js- a Jasmine spec that testssrc/Example.js, which Karma runsspec/ExampleControllerSpec.js- a Jasmine spec that tests the AngularJS code insrc/ExampleController.js, which Karma runs using PhantomJS