Set up test suite
I’d appreciate any pointers or information on setting something like that up for this project, if that’s something you’d be interested in helping with.
Yes, I can contribute by adding a testsuite in one of the following environments
- php (phpunit 8)
- javascript (for example jest)
- bash (shunit2)
Do you have any preference or suggestions on these environments?
Personally I would make the testsuite very simple: just parse two folders consisting of text files, the folders could be named something like:
- "false_positive"
- "false_negative"
The test is successful if any string in any text file of "false_positive" is not detected by the txt list and any string in any text file of "false_negative" is detected by the txt list.
Then run that testsuite on GitHub Actions (before every merge).
That would be cool, what do you think?
Originally posted by @vielhuber in https://github.com/splorp/wordpress-comment-blacklist/issues/44#issuecomment-918697669
I've now implemented a basic test suite.
As said, the testsuite is very simple: just parse two folders consisting of text files:
"/tests/false_positives" "/tests/false_negatives"
The test is successful if any string in any text file of "false_positives" is not detected by the txt list and any string in any text file of "false_negatives" is detected by the txt list.
Can you have a look at the fork if that generally fits your expectations?
git clone [email protected]:vielhuber/wordpress-comment-blacklist.git .
composer install
./vendor/bin/phpunit
For code changes, see this commit.
If yes, I would integrate GitHub Actions and make a pull request for this repository.
Did you have a chance to have a look at the test suite? Thanks :)
Any update on this?
Any update on this?
Sorry, I haven’t had a chance to give this much time.
Moving it up my priority list, though.