title: How to test Angular Router Resolve methed?
body: <p>I need to write unit test to Angular Router resolver.
  I wrote a unit test for creation, but I don't know how to test the return value and got stuck in it.</p>
  <p>Resolver that used for getting info for component</p>
  <pre><code>@Injectable
  export class InfoResolver implements Resolve&lt;any&gt; {
    constructor(private readonly http: HttpClient, private readonly store: Store&lt;IAppState&gt;) {}
  
    resolve(route: ActivatedRouteSnapshot): any {
      const a$ = this.store.pipe(select(a));
      const b$ = this.store.pipe(select(b));
  
      return combineLatest([a$, b$]).pipe(
        take(1),
        map(([a, b]) =&gt; {
          return a &amp;&amp; !(b &amp;&amp; route.paramMap.get(id) === 2)
            ? this.http.get('/url')
            : of(false)      
          })
      )
    }
  }
  </code></pre>
  <p>Unit test for creation of the resolver</p>
  <pre><code>const state = {
    a: true,
    b: false
  }
  
  describe('InfoResolver', () =&gt; {
    let resolver: InfoResolver
    let route = {
      paramMap: {
        get: (id) =&gt; 1
      }
    }
  
    beforeEach(async() =&gt; {
      TestBed.configureTestingModule({
        providers: [InfoResolver, provideMockStore({ state })]
      })
  
      resolver = TestBed.inject(InfoResolver)
    })
  
    it('should create', () =&gt; {
      expect(resolver).toBeTruthy()
    })
  })
  </code></pre>
  <p>How can I test the return value of resolve method?</p>