代码之家  ›  专栏  ›  技术社区  ›  Radhika Kandasamy

CombineTest未完全执行

  •  0
  • Radhika Kandasamy  · 技术社区  · 6 年前

    CombineTest未完全执行。()=>{this.loading=false}未执行。

    const combined = combineLatest(source1, source2, source3, source4);   
            combined.subscribe( 
                chart=> {  
                    if (chart[0] != undefined && chart[1] != undefined && chart[2] != undefined && chart[2] != undefined   
                    && chart[3] != undefined) {  
                    this.chartstest= chart[0];  
                    callFunction(test);  
                    },  
                    error => {  
                    console.log(error);  
                    },  
                    () => {  
                    this.loading = false;  
                    }  
                );  
    

    callFunction(test)函数正在正确执行,但在执行之后,它没有命中 ()=>this.loading=假。 请告知如何完成组合测试。

    提前谢谢。

    0 回复  |  直到 6 年前