外觀
此規則會對被註解掉的測試發出警告。它類似於 no-disabled-tests 規則。
你可能會忘記取消註解某些測試。此規則會對被註解掉的測試發出警告。它類似於 no-disabled-tests 規則。
// describe('foo', () => {}); // it('foo', () => {}); // test('foo', () => {}); // describe.skip('foo', () => {}); // it.skip('foo', () => {}); // test.skip('foo', () => {});
此規則與 eslint-plugin-vitest 相容,要使用它,請將以下設定添加到你的 .eslintrc.json
.eslintrc.json
{ "rules": { "vitest/no-commented-out-tests": "error" } }
jest/no-commented-out-tests 可疑
此規則的作用
此規則會對被註解掉的測試發出警告。它類似於 no-disabled-tests 規則。
為何這是不好的?
你可能會忘記取消註解某些測試。此規則會對被註解掉的測試發出警告。它類似於 no-disabled-tests 規則。
範例
此規則與 eslint-plugin-vitest 相容,要使用它,請將以下設定添加到你的
.eslintrc.json
參考資料