Tutorial: Testing


Edit this page

Testing in browser

To run the Jasmine tests in your browser, go to the following pages:

  • http://localhost/handsontablePro/test/jasmine/SpecRunner.html - Runs the tests in the browser. Note, that it runs only the Pro test suite, unless grunt test-free was run before (in that case, the Handsontable Free tests will be processed), as running the tests in the CLI generates the SpecRunner template.

Testing with Grunt (CLI)

To run Jasmine tests in your command line (using PhantomJS), first install Grunt (based on the instructions provided on page Building).

Useful commands:

  • grunt test - runs all test cases (Handsotnable Free and Handsontable Pro)
  • grunt test-free - runs only Handsontable Free tests
  • grunt test-pro - runs only Handsontable Pro tests
  • grunt test --filter CollapsibleColumns - runs only tests and suites matching the name "CollapsibleColumns"