GerbenJavado / LinkFinder

A python script that finds endpoints in JavaScript files
https://gerbenjavado.com/discovering-hidden-content-using-linkfinder
MIT License
3.64k stars 588 forks source link

add basic-unit-test #44

Closed Bankde closed 5 years ago

Bankde commented 5 years ago

It will be hard to improve the code (especially regex) without the unit-test to make sure that there is no regression/bug. I hope this unit-test will help improve the project and its search accuracy further.

Since this module uses import linkfinder, it is necessary that current code properly manages main block. I have done that in #43 . If that code contains any issue, someone else could fix it another way and still be able to merge this PR without any side-effect.

This test-case is provided as basic one. We could add more and more tests into it later.

EdOverflow commented 5 years ago

It might be a good idea to add these tests to https://travis-ci.org/ so that every new pull request runs through those test cases.

GerbenJavado commented 5 years ago

Thanks a lot!

Bankde commented 5 years ago

I initially thought we should wait #43 to pull first. On good side, this does not break any function, it could still confuse other contributors. I will speed #43 up so its ready to merge very soon.

Thank for a review anyway.