Jasmine example
A simple example of Jasmine tests using JSFiddle
HTML
<script src="http://searls.github.io/jasmine-all/jasmine-all-min.js"></script>
JavaScript
var objectOne = {
propertyOne: 'string',
propertyTwo: 5
}
var objectTwo = {
propertyOne: 'string',
propertyTwo: 5
}
describe('test suite', function(){
it('"toequal" object comparison will pass', function(){
expect(objectOne).toEqual(objectTwo);
});
// Block comment out below to pass test suite
it('"tobe" object comparison will fail', function(){
expect(objectOne).toBe(objectTwo);
});
});