You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository currently only contains one transform. It's tested by looping over fixture files with <test>.input.js and <test>.output.js.
There's no reason we shouldn't be able to use the same test for additional transforms and provide a new set of fixtures for each transform.
We can also automatically the scan the fixtures directory rather than referencing each one in the test file.
The only question is what to do with the comments describing each transform. I'm going to solve that by creating a <test>.md file for each of the fixtures. In the future, we could write a script to automatically generate documentation that collects everything in one place.
The text was updated successfully, but these errors were encountered:
To add a new transform:
1. Create a directory under tests/fixtures/transforms
2. Add the test fixtures (*.input.js, *.output.js, and *.md)
3. Implement the transform in lib/transforms
There's no need to create new (Mocha) test file. At this point, documenting the transform is still manual, but it could be easily automated.
pmcelhaney
pushed a commit
to pmcelhaney/eslint-transforms
that referenced
this issue
Dec 31, 2017
To add a new transform:
1. Create a directory under tests/fixtures/transforms
2. Add the test fixtures (*.input.js, *.output.js, and *.md)
3. Implement the transform in lib/transforms
There's no need to create new (Mocha) test file. At this point, documenting the transform is still manual, but it could be easily automated.
This repository currently only contains one transform. It's tested by looping over fixture files with
<test>.input.js
and<test>.output.js
.There's no reason we shouldn't be able to use the same test for additional transforms and provide a new set of fixtures for each transform.
We can also automatically the scan the fixtures directory rather than referencing each one in the test file.
The only question is what to do with the comments describing each transform. I'm going to solve that by creating a
<test>.md
file for each of the fixtures. In the future, we could write a script to automatically generate documentation that collects everything in one place.The text was updated successfully, but these errors were encountered: