Skip to content

Instantly share code, notes, and snippets.

@carlosble
Last active April 5, 2017 17:40
Show Gist options
  • Save carlosble/4e7e19a3873f5d552c10969e89985859 to your computer and use it in GitHub Desktop.
Save carlosble/4e7e19a3873f5d552c10969e89985859 to your computer and use it in GitHub Desktop.
Testing the component interaction with the backend
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