Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: throw a unit test error if the problem doesn't have a test file nor an entry on the readme #87

Open
ignacio-chiazzo opened this issue Jan 11, 2023 · 1 comment

Comments

@ignacio-chiazzo
Copy link
Owner

We often have to request changes to PRs due to tests not being present or an entry to the readme isn't added.

I suggest we create a unit test that:
1- reads all the problem names and asserts there is a file for testing. We can do that by inspecting the problem's name and asserting there is a corresponding ${file_name}_test name with assert_ methods.
1- Reads the README and asserts there is a link to the problem created. This one is less important than the previous one.

Thoughts @hot9cups ?

@hot9cups
Copy link
Collaborator

Hm, that is actually a good idea.

To achieve 1, we'd essentially have to do basically an assert that xyzTest.js file exists logic which doesn't seem so hard.

To achieve 2, we would need to do a regex match for example for the link which shouldn't be bad either.

The only thing to check maybe then is to confirm that all our files already follow this convention of ${file_name}_test strictly. They most probably already do so we should be good here.

Hm, yes I agree this would be beneficial to add, nice job for coming up with the idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants