A JavaScript Testing Framework
Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.
Documentation & guides live here: http://pivotal.github.com/jasmine/
The best way to use this component is to define it as a dev dependency in your component.json file.
"development": {
"bestander/jasmine": "*"
}
Then in the spec-runner HTML do
<!-- no links to jasmine standalone component -->
<!-- path to a `component(1)` built package -->
<script type="text/javascript" src="../build/build-dev.js"></script>
<script type="text/javascript" src="../build/build-dev.css"></script>
<!-- list of your test spec files -->
<script type="text/javascript" src="logic.spec.js"></script>
<script type="text/javascript" src="moreLogic.spec.js"></script>
<script type="text/javascript">
(function () {
var currentWindowOnload;
var htmlReporter;
var jasmine = require("<host name>/deps/jasmine").jasmine;
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function (spec) {
return htmlReporter.specFilter(spec);
};
currentWindowOnload = window.onload;
window.onload = function () {
if (currentWindowOnload) {
currentWindowOnload();
}
execJasmine();
};
function execJasmine() {
jasmineEnv.execute();
}
})();
</script>
- Search past discussions: http://groups.google.com/group/jasmine-js
- Send an email to the list: [email protected]
- View the project backlog at Pivotal Tracker: http://www.pivotaltracker.com/projects/10606
- Follow us on Twitter: @JasmineBDD
- Davis W. Frank, Pivotal Labs
- Rajan Agaskar, Pivotal Labs
- Christian Williams, Square
Copyright (c) 2008-2012 Pivotal Labs. This software is licensed under the MIT License.