best approach for testing javascript UI with jasmine

17,233

Solution 1

jasmine-jquery is what most people use for testing UI with jasmine. It allows you to create sandbox fixtures to run your tests upon while defining most of the matchers you will need. It's pretty straight-forward and even if you do not rely on jQuery in your app, will work fine for testing.

Solution 2

Checkout the new kid on the block https://github.com/tigbro/jasmine-ui

Share:
17,233
opensas
Author by

opensas

Updated on July 09, 2022

Comments

  • opensas
    opensas almost 2 years

    I was having a first look at the jasmine framework and it looks really promising, but I couldn't find an easy way to work with the dom.

    I mean, simulating user interaction, like completing and input, clicking a button, and then checking that the dom is correctly updated, like showing errors after input validation, and showing the modified data. Just the kind of stuff you usually do with tools like selenium.

    Is there a standard way to do it or is ui testing out of jasmine's domain and I should look for another framework for such a a task?