I'm needing launch different specs depending on the data received and don't know how to do this correctly.
I'm trying to declare multiple "finished states" in my spec but it is not working. Is there another way to declare multiple "finished states" for a spec?
Can someone give me a hand? Thanks!
checkRelationship.getRequestedsFriendships(data.sender, data.receiver).then(() => {
data._state='friends_bilateral_commit_start';
console.log('STARTS BILATERAL COMMIT');
return resolve(data);
}).catch((err) => {
data._state='friends_commit_start';
console.log('STARTS COMMIT');
return resolve(data);
});