Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script type="text/javascript" src="http://sukima.github.io/jasmine-all/jasmine-all-min.js"></script>
<script>jasmineRunner.noAutoRun();</script>
</head>
<body>
</body>
</html>
 
/* global describe, beforeEach, it, expect, jasmineRunner */
function Person(name) {
  this.name = name;
}
describe("Person", function () {
    var person;
    beforeEach(function () {
        person = new Person('Olli');
    });
    it("properly creates instances of it", function () {
        expect(person instanceof Person).toBeTruthy();
    });
  
    it("has the right name", function () {
        expect(person.name).toEqual('Olli');
    });
});  
jasmineRunner.run();
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers