it('should call api createUserWithEmailAndPassword', result => {
expect(result).toEqual(call([authMock, createUserWithEmailAndPassword], actionMock.user.email, actionMock.user.passwd))
return {
user: {
user: {
uid: undefined
}
}
}
})
const pathUser = `users/`+{user:{user:{uid:undefined}}} //i need to take a result of 'should call api createUserWithEmailAndPassword' to use here
如何将user.user.uid放入pathUser中? 在我的代码sagas中,我有:
const user = yield call([auth, createUserWithEmailAndPassword], email, passwd)
const pathUser = `users/${user.user.uid}`
...
yield database.ref(pathUser).update(newCadaster)