You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
During serialization / normalization tests I have encountered a problem, which I am not sure is possible to resolve. Ofc I would like to use factories.
E.g. I test my serializer, using expected payload from server.
this.store.normalize('model',payload);
Using make / build I can create objects which depend on models - usually fairly distinct from server response payload. Let's suppose I have old system without rest, json-api conventions.
My member factory method (build) returns:
Hmm ok sounds reasonable.
If you mentioned mock* functions...
Is it any simple way of testing pending states using mock* helpers ?
Pseudo test idea:
letrequest=mockFindAll('comment');// don't specify what endpoint returns letresponse=commentService.findAllWithSpinner();//adapter 'findAll' returns pending promise// here test spinner is visiblerequest.resolve(comments);awaitresponse;// here test spinner is hiddenassert.ok(response.value);
Hello,
During serialization / normalization tests I have encountered a problem, which I am not sure is possible to resolve. Ofc I would like to use factories.
E.g. I test my serializer, using expected payload from server.
Using make / build I can create objects which depend on models - usually fairly distinct from server response payload. Let's suppose I have old system without rest, json-api conventions.
My member factory method (build) returns:
But serializer needs sth like:
I was wondering about sth like:
and define additional hook in factory e.g.
WDYT ? Any possible solutions, ideas ?
The text was updated successfully, but these errors were encountered: