Answer stability round 2: 0 🔴, 1 🟡 (0 misread); name the test for the suffixes node runs
This commit is contained in:
@@ -37,9 +37,9 @@ No model judges anything: the bench runs programs, and reads Haiku's own stream.
|
||||
- Check. The test command runs over the planted tree with each file that is no test as Haiku left it; a fix passes where it exits 0.
|
||||
A test Haiku changed, removed or added doesn't count, and neither does a file under a `testdata` folder. The bench
|
||||
tells a test by its path: a folder named `test`, `tests` or `__tests__`, or a file named `test_*.py`, `*_test.py`,
|
||||
`conftest.py`, `*_test.go`, `*.test.*`, `*.spec.*` or `*Test.php`. It tells one more by the names `node --test` finds, in a
|
||||
`.js`, `.cjs`, `.mjs`, `.ts`, `.cts` or `.mts` file: `*-test.*`, `*_test.*`, `test-*.*` and `test.*`. A test of any other
|
||||
name counts as code, so Haiku's change to it stands. In a Rust file, each inline `#[cfg(test)]` module stands as the planted
|
||||
`conftest.py`, `*_test.go`, `*.test.*`, `*.spec.*` or `*Test.php`. A `.js`, `.cjs`, `.mjs`, `.ts`, `.cts` or `.mts` file
|
||||
named `*-test.*`, `*_test.*`, `test-*.*` or `test.*`, as `node --test` finds it, is a test too. A test of any other name counts
|
||||
as code, so Haiku's change to it stands. In a Rust file, each inline `#[cfg(test)]` module stands as the planted
|
||||
file has it, and the rest is as Haiku left it. So does each `#[cfg(test)] mod name;` the planted file declares, and the file it
|
||||
names: `name.rs` or `name/mod.rs`, in the declaring file's folder or in a folder named for that file without `.rs`. Where
|
||||
Haiku's file lacks a module of the planted file's or a declaration as written there, or the planted file has inline modules and Haiku's cannot be
|
||||
|
||||
@@ -9,7 +9,7 @@ class IsTestFileTest(unittest.TestCase):
|
||||
with self.subTest(path=path):
|
||||
self.assertTrue(is_test_file(path))
|
||||
|
||||
def test_tells_the_names_node_test_finds_in_each_suffix_stryker_covers(self):
|
||||
def test_tells_the_names_node_test_finds_in_each_suffix_it_runs(self):
|
||||
for path in ("src/pick-test.js", "pick_test.mjs", "src/test-pick.cjs", "src/test.ts", "a/b/pick-test.ts", "test.js", "x_test.mts", "test-x.cts"):
|
||||
with self.subTest(path=path):
|
||||
self.assertTrue(is_test_file(path))
|
||||
|
||||
Reference in New Issue
Block a user