Last active
April 5, 2017 17:40
-
-
Save carlosble/4e7e19a3873f5d552c10969e89985859 to your computer and use it in GitHub Desktop.
Testing the component interaction with the backend
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
it("saves the profile in the backend", (done) => { | |
simulateChangeInPhone(change); | |
let actualProfile; | |
spyNotifier.slowOperationFinished = () => { | |
expect(actualProfile.phone).toEqual(change); | |
done(); | |
}; | |
stubApi.saveProfile = (profile) => { | |
actualProfile = profile; | |
return Promise.resolve({message: 'Success'}); | |
}; | |
saveProfileButton().simulate("click"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment