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

Implement unit tests for the parseQueryString utility function #13837

Merged
merged 1 commit into from
Aug 1, 2021

Conversation

timvandermeij
Copy link
Contributor

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 special decodeURIComponent(null) case so that the unit tests assert that we don't accidentally return "null" anymore.)

@timvandermeij
Copy link
Contributor Author

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/e9df1882354ef1e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Windows)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://3.101.106.178:8877/a11c68f3468d97f/output.txt

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a 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!

web/ui_utils.js Outdated Show resolved Hide resolved
@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/e9df1882354ef1e/output.txt

Total script time: 3.78 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/a11c68f3468d97f/output.txt

Total script time: 5.21 mins

  • Unit Tests: Passed

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.
@timvandermeij
Copy link
Contributor Author

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Windows)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://3.101.106.178:8877/aee05f8ab56eee9/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/296117939f1efac/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/296117939f1efac/output.txt

Total script time: 3.76 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2021

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/aee05f8ab56eee9/output.txt

Total script time: 5.50 mins

  • Unit Tests: FAILED

@timvandermeij
Copy link
Contributor Author

timvandermeij commented Aug 1, 2021

The last unit test run failed because of a newly added unit test, TEST-UNEXPECTED-FAIL | checks that docIds are unique and increasing | in chrome | Expected 9 to be less than 0. I have also seen this locally, so I'll make a follow-up issue for that.

@timvandermeij timvandermeij merged commit 273cea8 into mozilla:master Aug 1, 2021
@timvandermeij timvandermeij deleted the unit-test-query-string branch August 1, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants