Skip to content

Commit 7f740e9

Browse files
feature: update unknown error test
1 parent 5f0fbcc commit 7f740e9

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

packages/custom_lint_core/test/configs_test.dart

+11-5
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,17 @@ custom_lint:
383383
errors:
384384
rule_name_1: invalid_severity
385385
''');
386-
final configs = CustomLintConfigs.parse(analysisOptions, packageConfig);
387-
388-
expect(configs.errors, {
389-
'rule_name_1': ErrorSeverity.NONE,
390-
});
386+
expect(
387+
() => CustomLintConfigs.parse(analysisOptions, packageConfig),
388+
throwsA(
389+
isArgumentError.having(
390+
(e) => e.message,
391+
'message',
392+
'Provided error severity: invalid_severity specified for key: rule_name_1 is not valid. '
393+
'Valid error severities are: none, info, warning, error',
394+
),
395+
),
396+
);
391397
});
392398

393399
test('Merges error severities from included config file', () {

0 commit comments

Comments
 (0)