-
Notifications
You must be signed in to change notification settings - Fork 5
Jasmine FAQ (Unit Testing)
htsungwing edited this page Feb 2, 2016
·
16 revisions
### Background Overview
Jasmine is developed by Pivotal Labs and was once named JsUnit. Eventually it is transformed to the known Jasmine Framework. Jasmine is excellent for JavaScript testing and only require a JS enabled browser along with the Jasmine script. It uses testing suites where testing results are compared with expected values. A set of predefined matchers
can be called to test the system. The framework can be downloaded from GitHub along with a page of instruction that
guides a user to understanding how to run tests in most JavaScript supported browser.[1] "Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests. This guide is running against Jasmine version 2.0.0."[2] Review sources below for more information regarding basics of Jasmine framework.
Most of the behavior that I want to test depends on data loaded from Firebase in the cloud. How do I test this?
I'm writing some functionality in a new JS file. Is there a convention on where I should put the corresponding tests in the file structure?
- History/Background (http://www.htmlgoodies.com/beyond/javascript/testing-javascript-using-the-jasmine-framework.html)
- Jasmine Introduction (http://jasmine.github.io/2.0/introduction.html)
- Jasmine on Github (https://github.com/jasmine/jasmine)