Cypress - Component Testing
Examine the following Cypress test code:
What is the error in this code?
import { mount } from '@cypress/react';
function TextInput() {
return <input placeholder='Enter text' />;
}
describe('TextInput test', () => {
it('checks placeholder', () => {
mount(TextInput);
cy.get('input').should('have.attr', 'placeholder', 'Enter text');
});
});What is the error in this code?
