angular-architects / ngrx-toolkit

Various Extensions for the NgRx Signal Store
MIT License
174 stars 23 forks source link

test(dataService): add basic tests for `withDataService` #89

Open michael-small opened 3 months ago

michael-small commented 3 months ago

Prerequisite to feat: add support for observables to withDataService

I said that I would make tests for withDataService featuring support for observables. However, it would be good to have existing tests for the feature as it is currently with promises before the withDataService is further extended.

Once I have a test for each method of the interface DataService with promises stubbed out then I'll bump this from a draft to a full PR. Tests are not my strong suit, so please roast these.

edit: Progress/TODO 9/29/2024

rainerhahnekamp commented 2 months ago

Good idea @michael-small, I'll wait for the removal of the draft status.

michael-small commented 2 months ago

@rainerhahnekamp

I am marking this as ready since it is basically done and covers most scenarios.

Perhaps this is too undercooked a submission as well but I think I may have overthought/overdone certain aspects and would appreciate feedback before going further in a fruitless direction.

michael-small commented 2 months ago

Good work so far. I'd suggest that in the first round of review, we focus on slimming down the amount of code. Depending on where we end up, we could then maybe split the file into multiple files or everything is alright.

Sounds good, thanks. I'll slim it down with your suggestions and a couple things that have occurred to me since and then @ you when it's at that point.