karma-es6-shim-example
v1.0.3
Published
Example repository to demonstrate the usage of https://github.com/radify/karma-es6-shim
Downloads
14
Readme
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 install
Running the tests
gulp
What'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 theimport
statements 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