Skip to content

Client side testing

Fritz Lekschas edited this page Oct 20, 2015 · 3 revisions

Run test

Suppose you SSHed into the VM or on the server.

$ cd refinery/ui
$ grunt karma

Coverage

Karma is generating a coverage report, which helps to spot untested code. The report is generated automatically when calling grunt karma and can be found in refinery/ui/coverage.

Technologies

  • Karma (Test runner)
  • Jasmine (Test framework)
  • Grunt (Automates tests)
  • PhantomJS (Standard test browser)
  • Chrome, Firefox and Safari (Extended test browsers)

Setup

Grunt configures and executes Karma when you call grunt karma. To get Karma started Grunt picks up all JavaScript vendor files from refinery/ui/config.json and adds them to the Karma config.

Note: It is crucial that the order of vendor files matches the order you would load them in HTML!