-
-
Notifications
You must be signed in to change notification settings - Fork 725
Karma
Karma is used to run AngularJS specs.
Annoyingly, we need to install the Node.js Package Manage (npm) to install karma. Amusingly, one can install npm with homebrew, and vice-versa. I chose to install npm with homebrew:
$ brew update
$ brew install npm
Once that is complete, you should be able to jump straight to installing karma. NOTE: At present I would recommend using the global flag (-g) for installing karma packages with npm, as we have not yet set up a npm package.json file to manage versioning and dependencies within the ofn project.
$ brew update
$ npm install -g karma
Next we need a bunch of other packages (as they are now split up into separately rather than being contained in one all-inclusive package): the jasmine BDD testing framework, the coffee preprocessor and a chrome-launcher:
$ npm install karma-jasmine
$ npm install karma-coffee-preprocessor
$ npm install karma-chrome-launcher
You will likely need to install the karma command line packages as well:
$ sudo npm install -g karma-cli
Check that NodeJS is installed. If you install from a package manager you bin may be called nodejs so you just need to symlink it:
$ ln -s /usr/bin/nodejs /usr/bin/node
And then you should be ready to go (see next section)....
Running AngularJS specs with karma has been made pretty simple through use of a rake task which pulls together the karma configuration file (config/ng-test.conf.js
), and a manifest file (spec/javascripts/application_spec.js
) and then passes them on to karma to run:
$ rake karma:start
or if you are using zeus:
$ zeus rake karma:start
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design