1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Enable the unicorn/prefer-regexp-test ESLint plugin rule

Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
This commit is contained in:
Jonas Jenwald 2022-09-19 16:29:34 +02:00
parent bf78ccac30
commit 20b9887476
4 changed files with 5 additions and 4 deletions

View file

@ -214,9 +214,9 @@ window.onload = function () {
const extra = match[4];
gTestItems.push({
pass: !state.match(/FAIL$/),
pass: !state.endsWith("FAIL"),
// only one of the following three should ever be true
unexpected: !!state.match(/^TEST-UNEXPECTED/),
unexpected: state.startsWith("TEST-UNEXPECTED"),
random: random === "(EXPECTED RANDOM)",
skip: extra === " (SKIP)",
url,