-
Notifications
You must be signed in to change notification settings - Fork 1
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
introduce automated (integration) tests for the node module #12
Conversation
Varun0157
commented
Jun 18, 2024
- increments the exit code for each "failure"
- tests the requests in a stated bundle
- requests whose name contain the word positive, are expected to have all their tests pass
- requests whose name contain the word negative, are expected to have all their tests fail
- first, we calculate the expected number of tests, and compare it with the received number of results, to ensure a situation like the regression on status checks does not occur again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I would like the test code to be as simple as possible. I realize lots of code has been copied over from the CLI, but is not needed. Keeping the test code to the bare minimum and less complex (I was hoping a single file) makes us confident that when something fails, it is not in the test code. Otherwise we spend debugging the test code too, which defeats the purpose of automated testing.
|
||
const VARFILE_EXTENSION = ".zzv"; | ||
|
||
function getVarFilePaths(dirPath: string): string[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us not read extra variables from files. These probably will go into the testing of the runner rather than zzapi itself.
The idea is to simplify test code. If the test code itself is not simple, when something fails, we will not be sure if the test code has a bug or the module has a bug.
Try and simplify it as much as you can. Bare minimum, only to test the functionality that this module provides, nothing more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading variables from varFiles is still the job of the module right? The runner just gets the content and passes it to the module.
I will attempt to simplify the code.
…nner, not the module