Created
June 2, 2017 18:42
-
-
Save gdborton/f4784f48e75d403f1a8f0d938f7f524d to your computer and use it in GitHub Desktop.
Converted Test File
This file contains hidden or 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 'chai'; | |
// how a test might have been written Mocha. | |
describe('addition', () => { | |
context('a sane universe', () => { | |
test('one plus two equals three', () => { | |
expect(1 + 2).to.equal(3); | |
}); | |
}); | |
}); | |
// how the same test works with our Jest implementation. | |
describe('addition', () => { | |
// context only works in Jest here because of the previous snippet | |
context('a sane universe', () => { | |
// This is the only line that has changed `test` => `it` | |
it('one plus two equals three', () => { | |
expect(1 + 2).to.equal(3); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment