passsy / deleted-testsr3
Flag Deleted or Commented Out Tests
PublicTreat a deleted, commented-out or skipped test as a red flag that needs a reason: fix it, delete it with a tracking issue, or skip it with an issue number.
tests, run by the registry7 passed · slowest 2.4 ms
✓fires1.7 ms
fires on a test the agent comments out
write test/price_test.dartfired: line 2
void main() {
// test('should handle edge case', () {
// expect(result, equals(expected));
// });
test('applies discount', () {});
}✓quiet2.0 ms
stays quiet on a commented test that was already there
write test/price_test.dart · wrote line 5stayed quiet
void main() {
// test('should handle edge case', () {
// expect(result, equals(expected));
// });
test('applies discount', () {});
}✓skips0.0 ms
stays quiet when the agent only reads the file
read test/price_test.dartno handler of the detector wants this event
void main() {
// test('should handle edge case', () {
// expect(result, equals(expected));
// });
test('applies discount', () {});
}✓skips0.0 ms
stays quiet outside test files
write lib/price.dartno handler of the detector wants this event
// group('legacy', () {});✓fires2.3 ms
fires on a skip without a tracking issue: test('flaky test', () {}, skip: true);
write test/sync_test.dartfired: line 2
void main() {
test('flaky test', () {}, skip: true);
}✓fires2.4 ms
fires on a skip without a tracking issue: test('flaky test', () {}, skip: 'Temporarily disabled');
write test/sync_test.dartfired: line 2
void main() {
test('flaky test', () {}, skip: 'Temporarily disabled');
}✓quiet2.2 ms
stays quiet on a skip with a tracking issue
write test/sync_test.dartstayed quiet
void main() {
test('flaky test', () {}, skip: 'Issue #456 - Flaky on CI, needs investigation');
}detector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { detect, edit, read, source, write } from "@wellactually/sdk/v3/test";
const commented = source`
void main() {
// test('should handle edge case', () {
// expect(result, equals(expected));
// });
test('applies discount', () {});
}
`;
test("fires on a test the agent comments out", () => {
expect(detect(write("test/price_test.dart", commented))).toEqual([{ line: 2 }]);
});
test("stays quiet on a commented test that was already there", () => {
expect(detect(edit("test/price_test.dart", commented, { written: " test('applies discount', () {});" }))).toEqual([]);
});
test("stays quiet when the agent only reads the file", () => {
expect(detect(read("test/price_test.dart", commented))).toEqual([]);
});
test("stays quiet outside test files", () => {
expect(detect(write("lib/price.dart", "// group('legacy', () {});"))).toEqual([]);
});
test.each([
" test('flaky test', () {}, skip: true);",
" test('flaky test', () {}, skip: 'Temporarily disabled');",
])("fires on a skip without a tracking issue: %s", (line) => {
expect(detect(write("test/sync_test.dart", `void main() {\n${line}\n}`))).toEqual([{ line: 2 }]);
});
test("stays quiet on a skip with a tracking issue", () => {
const code = "void main() {\n test('flaky test', () {}, skip: 'Issue #456 - Flaky on CI, needs investigation');\n}";
expect(detect(write("test/sync_test.dart", code))).toEqual([]);
});