Closed jamestalmage closed 5 years ago
I understand your reasoning behind for the first part, but that may not include test helper files. For instance, if your tests are in test.js
, and you wrote your assertion helpers (which use t.same()
) in test-helper.js
, then you would not update the right file.
Right, our code would need to figure that out. The convention is they can be in a helpers
folder, or prefixed with a _
.
I think we should do this once, in AVA itself, so other modules can reuse it: https://github.com/sindresorhus/ava/issues/700
And we shouldn't forget about fixtures
.
For codemods like
same => deepEquals
, we should just examine the AVA config inpackage.json
to determine which files are test files, which are sources, etc.We could do similar things for
mocha
/tap
/etc by parsing their configs. (not sure we want to go down that road).