Created
March 18, 2018 08:37
-
-
Save NicholasBoll/dbf9bcbd2546168220a1a40ffadb4b83 to your computer and use it in GitHub Desktop.
Using Jest's expect directly in Cypress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expect from 'expect' | |
describe('page', () => { | |
it('should allow usage of expect directly from jest', () => { | |
cy.wrap(5).should(subject => { | |
expect(subject).toEqual(5) | |
}) | |
cy.wrap({ foo: 'bar' }).should(subject => { | |
expect(subject).toHaveProperty('foo', 'bar') | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment