Created
August 16, 2016 04:57
-
-
Save matthieu-D/830b9be280b32f9870a8ff1cfbabed33 to your computer and use it in GitHub Desktop.
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
describe('App', () => { | |
let a; | |
beforeEach(() => { | |
//We set or reset a here; | |
a = 'Apple'; | |
}); | |
it('should be an Apple ', () => { | |
expect(a).toEqual('Apple'); | |
// We change the value | |
a = 'Pear'; | |
}); | |
it('should not be a Pear ', () => { | |
//But it's still an Apple since we reset it in beforeEach | |
expect(a).toEqual('Apple'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment