typescript - Typ 'Promise' ist dem Typ 'CanReturnChainable' in Cypress nicht zuweisbar
Ich habe gerade die Cypress-Version von 4.8.0 auf 4.9.0 aktualisiert und erhielt:
Beispiel für einen Test:
it('should have the right initial login state', () => {
cy.fixture('loginInitialState').then(initialState => {
cy.wait(100);
cy.window().should('have.property', 'store');
cy.checkReduxState('login', 'initial', initialState);
});
cy.pause();
});
und ich dachte, dass die folgende Hinzufügung des Typs helfen wird:
it('should have the right initial login state', () => {
cy.fixture('loginInitialState').then(initialState => {
cy.wait(100);
cy.window().should('have.property', 'store');
<any>cy.checkReduxState('login', 'initial', initialState);
});
cy.pause();
});
Aber es hat nicht geholfen, irgendeine Idee? Ich benutze TypeScript.
