Last active
June 22, 2018 16:53
-
-
Save enricopolanski/3810c0789c9196c4876487bbf73aa0f8 to your computer and use it in GitHub Desktop.
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 StudiesObserver from './StudiesObserver'; | |
beforeEach(()=> { | |
const studiesObserver = new StudiesObserver(); | |
}); | |
test('Changing the StudyBlock.status property should trigger update()', () => { | |
const spy = jest.spyOn(studiesObserver, 'update'); | |
const isUpdating = studiesObserver.update(); | |
expect(spy).toHaveBeenCalled(); | |
}) | |
/* Jest error: | |
ReferenceError: studiesObserver is not defined | |
const spy = jest.spyOn(studiesObserver, 'update'); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment