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

Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments #11873

Merged
merged 1 commit into from
May 7, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

Having assert calls without a message string isn't very helpful when debugging, and it turns out that it's easy enough to make use of ESLint to enforce better assert call-sites.
In a couple of cases the assert calls were changed to "regular" throwing of errors instead, since that seemed more appropriate.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-restricted-syntax

… always called with two arguments

Having `assert` calls without a message string isn't very helpful when debugging, and it turns out that it's easy enough to make use of ESLint to enforce better `assert` call-sites.
In a couple of cases the `assert` calls were changed to "regular" throwing of errors instead, since that seemed more appropriate.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-restricted-syntax
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented May 5, 2020

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

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

@pdfjsbot
Copy link

pdfjsbot commented May 5, 2020

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/cb78b79b7ab60d2/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 5, 2020

From: Bot.io (Linux m4)


Failed

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

Total script time: 25.60 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/f340ae181b4b5ef/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented May 5, 2020

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/cb78b79b7ab60d2/output.txt

Total script time: 28.50 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/cb78b79b7ab60d2/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit bf2ce76 into mozilla:master May 7, 2020
@timvandermeij
Copy link
Contributor

Looks like a useful addition to me. Thanks!

@Snuffleupagus Snuffleupagus deleted the eslint-assert branch May 7, 2020 22:25
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