-
Notifications
You must be signed in to change notification settings - Fork 2.2k
A simple project
Steve Gravrock edited this page Mar 21, 2021
·
13 revisions
The Wiki pages are deprecated! Please check jasmine.github.io for documentation.
To use Jasmine with a simple project, download the standalone distribution for the desired version of Jasmine from the jasmine releases page. Edit the SpecRunner.html file (located in the root of your jasmine standalone download):
- add your source files as separate
<script>
tags before the Jasmine files to the head element - add your spec files as separate
<script>
tags after the Jasmine files to the head element - All paths pointing to lib/jasmine-jasmine-1.1.0.rc1, if any, should point to the parent directory. E.g.: lib/jasmine-1.1.0.rc1/jasmine.js should point to ../jasmine.js
Point your favorite browser to the SpecRunner.html
file and reload to run your specs.
As you add new files to your project, make sure to add source and spec <script>
tags.
If you get tired of managing your files manually check out how to use Jasmine in A ruby project (with or without rails) (or a project that doesn't mind having Ruby around).