Running a single test file

后端 未结 10 540
囚心锁ツ
囚心锁ツ 2020-12-07 15:29

Is there a way to run ng test for a single file instead of for the entire test suite? Ideally, I\'d like to get the quickest possible feedback loop when I\'m e

10条回答
  •  感情败类
    2020-12-07 15:48

    It's worth mentioning that you can disable particular test without commenting by xdescribe and xit

    xdescribe('Hello world', () => { 
      xit('says hello', () => { 
        expect(helloWorld())
            .toEqual('Hello world!');
      });
    });
    

    And as somebody already said if you want to focus on some test then fdescribe and fit

    fdescribe('Hello world', () => { 
      fit('says hello', () => { 
        expect(helloWorld())
            .toEqual('Hello world!');
      });
    });
    

提交回复
热议问题