Skip to content

Instantly share code, notes, and snippets.

@NicholasBoll
Created March 18, 2018 08:37
Show Gist options
  • Save NicholasBoll/dbf9bcbd2546168220a1a40ffadb4b83 to your computer and use it in GitHub Desktop.
Save NicholasBoll/dbf9bcbd2546168220a1a40ffadb4b83 to your computer and use it in GitHub Desktop.
Using Jest's expect directly in Cypress
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