Checking variable value with Jasmine

1.9k views Asked by At

How can I check a variable value with Jasmine? Imagine for example that I have this function:

function myTestFunction(){
   var z = 100;
}

How can I test with Jasmine if the value of my variable "z" is 100?

Something like:

describe("TEST 1", function () {
    beforeEach(function () {
        setUpHTMLFixture();                                 
        $('#show').trigger("onmouseover");                      
    });

    it("check if value contains 100", function () {
        expect($(var z)).toEqual("100");            
    });
});
0

There are 0 answers