-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Implement unit tests for the parseQueryString
utility function
#13837
Implement unit tests for the parseQueryString
utility function
#13837
Conversation
e8a2788
to
ea5fbb8
Compare
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/e9df1882354ef1e/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/a11c68f3468d97f/output.txt |
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.
r=me, with passing tests; thank you adding more unit-tests!
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/e9df1882354ef1e/output.txt Total script time: 3.78 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/a11c68f3468d97f/output.txt Total script time: 5.21 mins
|
Now that these unit tests are in place, we also take the opportunity to slightly modernize the code itself by using a `for ... of` loop.
ea5fbb8
to
d1c0f8f
Compare
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/aee05f8ab56eee9/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/296117939f1efac/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/296117939f1efac/output.txt Total script time: 3.76 mins
|
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/aee05f8ab56eee9/output.txt Total script time: 5.50 mins
|
The last unit test run failed because of a newly added unit test, |
Now that these unit tests are in place, we also take the opportunity to slightly modernize the code itself by using a
for ... of
loop.(I noticed after the
Map
change that this function did not have unit test coverage yet, so I thought it would be good to add that, especially considering the specialdecodeURIComponent(null)
case so that the unit tests assert that we don't accidentally return"null"
anymore.)