Skip to content

Commit

Permalink
Merge pull request #113 from mikelgo/feature/improve-rx-stateful-tests
Browse files Browse the repository at this point in the history
Feature/improve rx stateful tests
  • Loading branch information
mikelgo committed Aug 20, 2024
2 parents ca6e0e3 + b72154d commit 8bbd01b
Show file tree
Hide file tree
Showing 4 changed files with 789 additions and 400 deletions.
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@

.angular

/.nx/cache
/.nx/cache

/libs/rx-stateful/src/lib/rx-stateful-reworked.spec.ts
2 changes: 1 addition & 1 deletion libs/rx-stateful/src/lib/rx-stateful$.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ function deriveInitialValue<T, E>(mergedConfig: RxStatefulConfig<T,E>){

function handleError<T,E>(error: E, mergedConfig: RxStatefulConfig<T, E>, error$$: Subject<RxStatefulWithError<T, E>>){
mergedConfig?.beforeHandleErrorFn?.(error);
const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any)?.message);
const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any));
error$$.next({ error: errorMappingFn(error), context: 'error', isLoading: false,
isRefreshing: false, value: null });
return NEVER;
Expand Down
Loading

0 comments on commit 8bbd01b

Please sign in to comment.