Skip to content

Commit

Permalink
fix(local-traits): fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Guerrero authored and gabrielguerrero committed Mar 30, 2022
1 parent 14a2dd7 commit a453684
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions libs/ngrx-traits/testing/src/provide-mock-local-traits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function provideMockLocalTraits<
}: {
traitFactory: Type<T>;
selectors?: {
[key in keyof T['localSelectors']]?: ReturnType<T['localSelectors'][key]>;
[key in keyof T['selectors']]?: ReturnType<T['selectors'][key]>;
};
}): Provider[] {
return [
Expand All @@ -42,11 +42,8 @@ export function provideMockLocalTraits<
if (selectors) {
Object.keys(selectors).forEach(
(key) =>
trait.localSelectors?.[key] &&
mockStore.overrideSelector(
trait.localSelectors[key],
selectors?.[key]
)
trait.selectors?.[key] &&
mockStore.overrideSelector(trait.selectors[key], selectors?.[key])
);
}
return trait;
Expand Down

0 comments on commit a453684

Please sign in to comment.