jasmine ex 3: testable code

by ronapelbaum

HTML

<script src="https://jasmine.github.io/2.4/lib/jasmine.js"></script>
<script src="https://jasmine.github.io/2.4/lib/jasmine-html.js"></script>
<script src="https://jasmine.github.io/2.4/lib/boot.js"></script>
<link rel="stylesheet" href="https://jasmine.github.io/2.4/lib/jasmine.css">

JavaScript

//--------------BL------------
var Greeter = function() {
    function greet(name) {
        //TODO this is complex code
        console.log("Hello " + name);
    }
    this.greet = greet;
};



//--------------specs------------
describe('greet test suite', function() {
    var myGreeter;

    beforeEach(function() {
        myGreeter = new Greeter();
    });

    it('should greet corretly', function() {
        expect(true).toBe(false);
    })
});