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

Convert done callbacks to async/await in the smaller unit test files #13222

Merged
merged 7 commits into from Apr 14, 2021

Conversation

timvandermeij
Copy link
Contributor

This commit series is the next step (after PR #13216) in getting rid of the outdated done callbacks by converting to async/await instead. Not using callbacks and having less indentation/code makes the overall code a bit easier to read. I have purposely done the smaller files first to make it easier to review.

@timvandermeij
Copy link
Contributor Author

/botio unittest

@pdfjsbot
Copy link

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/b30a811cf91b1ae/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/6c79b0d5b521798/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

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

Total script time: 3.67 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/6c79b0d5b521798/output.txt

Total script time: 5.53 mins

  • Unit Tests: Passed

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.

Thanks for taking this on!

I've only looked briefly at the first two commits, and found two possible bigger picture issues; hence I'm holding off on doing a full review since I guess that these problems might occur elsewhere too.

test/unit/util_spec.js Outdated Show resolved Hide resolved
test/unit/ui_utils_spec.js Outdated Show resolved Hide resolved
@timvandermeij
Copy link
Contributor Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

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

Total script time: 3.91 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 13.67 mins

  • Unit Tests: Passed

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.

This isn't just less code, but it's much nicer to look at compared to the callback functions everywhere :-)

Thank you for doing this, and please continue with the rest of the unit-tests when you've got the time!

@timvandermeij timvandermeij merged commit cd2c4e2 into mozilla:master Apr 14, 2021
@timvandermeij timvandermeij deleted the unit-test-async branch April 14, 2021 18:37
@timvandermeij
Copy link
Contributor Author

Will do, thanks!

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.

None yet

3 participants