Skip to content

Instantly share code, notes, and snippets.

@glcheetham
Created May 30, 2016 09:34
Show Gist options
  • Save glcheetham/cd116b5e9340908cf6d06f364364cfee to your computer and use it in GitHub Desktop.
Save glcheetham/cd116b5e9340908cf6d06f364364cfee to your computer and use it in GitHub Desktop.
Chai object comparison (right)
describe('housecat comparison', () => {
it('should let me know that both objects are the same', () => {
expect({
name: 'Tiger',
species: 'Felis Catus',
favouriteSnack: 'Tuna',
schedule: {
breakfast: '08:00',
naptime: '10:00',
dinner: '12:00',
tea: '18:00'
}
}).to.deep.equal({
name: 'Tiger',
species: 'Felis Catus',
favouriteSnack: 'Tuna',
schedule: {
breakfast: '08:00',
naptime: '10:00',
dinner: '12:00',
tea: '18:00'
}
})
})
})
@cpxPratik
Copy link

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment