Hi everyone i am quite new to protractor and jasmine and i am expecting to see a particular message in the info level of my browser logs is there recommended way of doing this? i have tried this
describe('SearchResultsComponent', () => {
let spy;
let myFunction = (log) => {
console.log(log);
};
myFunction(log);
beforeAll(async () => {
spy = jest.fn();
});
test('Function prints message: "hello"', () => {
const log = 'hello';
spy = jest.spyOn(console, 'log');
myFunction(log);
expect(spy).toHaveBeenCalled();
expect(spy.calls.argsFor(0)).toEqual(['hello']);
});
});