[Solved] Testing javascipt using jasmine

Hope your questions is not about any problem, Here i’m attaching basic things for you to understand jasmine . I guess you have already did the setup of jasmine to start writing test cases. Here is a sample example. function helloWorld() { return ‘Hello world!’; } describe(‘Hello world’, function () { it(‘says hello’, function () … Read more

[Solved] Variable scope in protractor

Try changing var to let. This allows to access your version inside your specs. describe(‘Nodeprojectpart2Component’, () => { let version = ”; beforeEach(() => { version = ‘1.0’; }); it(‘test’, () => { console.log( ‘version’ + version); }); }); Issue with your code – Your are retrieving the value of version inside an asynchronous/callback function. … Read more