Skip to content

Commit

Permalink
[tools] Fix test for EsLint and Stylelint
Browse files Browse the repository at this point in the history
After the latest update to the deps these test started failing.

Bug: none
Change-Id: Ifd4a4099e465aa61087675f2fb564272e277ced0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148217
Auto-Submit: Nikolay Vitkov <[email protected]>
Reviewed-by: Benedikt Meurer <[email protected]>
Commit-Queue: Nikolay Vitkov <[email protected]>
  • Loading branch information
Lightning00Blade authored and Devtools-frontend LUCI CQ committed Jan 8, 2025
1 parent 9554d8f commit 1f49d6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/eslint_rules/tests/prefer-url-string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
'use strict';

const rule = require('../lib/prefer-url-string.js');
const tsParser = require('@typescript-eslint/parser');
const ruleTester = new (require('eslint').RuleTester)({
parserOptions: {ecmaVersion: 9, sourceType: 'module'},
parser: require.resolve('@typescript-eslint/parser'),
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tsParser,
},
});

ruleTester.run('prefer-url-string', rule, {
Expand Down
12 changes: 12 additions & 0 deletions scripts/stylelint_rules/tests/use_theme_colors_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -60,6 +61,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -78,6 +80,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -96,6 +99,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -112,6 +116,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -130,6 +135,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand Down Expand Up @@ -212,6 +218,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand All @@ -230,6 +237,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand Down Expand Up @@ -286,6 +294,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css',
url: undefined,
},
{
line: 2,
Expand All @@ -295,6 +304,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css',
url: undefined,
},
]);
});
Expand Down Expand Up @@ -333,6 +343,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css',
url: undefined,
},
]);
});
Expand Down Expand Up @@ -417,6 +428,7 @@ describe('use_theme_colors', () => {
rule: 'plugin/use_theme_colors',
severity: 'error',
text: EXPECTED_ERROR_MESSAGE,
url: undefined,
},
]);
});
Expand Down

0 comments on commit 1f49d6a

Please sign in to comment.