Added examples for toMatchSnapshot() to illustrate cy.wrap() and cy.readFile():
it('toMatchSnapshot - object of type any using cy.wrap()', () => {
const actualString = "this is an exmample of string data you want to match to a snapshot";
cy.wrap(actualString).toMatchSnapshot();
const actualObject = { name: 'Jane Lane' };
cy.wrap(actualObject).toMatchSnapshot();
});
it('toMatchSnapshot - readFile', () => {
cy.readFile('menu.json').toMatchSnapshot();
});
Added examples for toMatchSnapshot() to illustrate cy.wrap() and cy.readFile():