Skip one test in test file Jest

后端 未结 3 721
盖世英雄少女心
盖世英雄少女心 2021-02-04 23:21

I\'m using Jest framework and have a test suite. I want to turn off/skip one of my tests.

Googling documentation doesn\'t give me answers.

Do you know the answ

3条回答
  •  自闭症患者
    2021-02-04 23:42

    I found the answer here

    https://devhints.io/jest

    test('it is raining', () => {
      expect(inchesOfRain()).toBeGreaterThan(0);
    });
    
    test.skip('it is not snowing', () => {
      expect(inchesOfSnow()).toBe(0);
    });
    

    Link on off doc

提交回复
热议问题