I have multiple functions and a lot of code inside $(document).ready(function())
. I am using jasmine to test the functions inside the ready function as well as the code inside ready()
but when the test cases inside describe are executed it is not able to access the code inside the ready
function.
$(document).ready(function () {
function testMe(){
testVar = true;
}
});
Jasmine test suite
describe("test suite", function(){
beforeEach(function () {
testme = false
});
it("Test Alert Box Message For Change Modal", function() {
expect(testme).toEqual(true);
});
});
Kindly suggest what approach needs to be taken for the above approach.