Skip to content

Commit

Permalink
add additional test, add new line
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-orlando committed Nov 9, 2023
1 parent 5cc9154 commit d87e468
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion secureli/resources/files/configs/typescript.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ eslintrc:
extends: ['google', 'plugin:@typescript-eslint/recommended', 'prettier']
parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
- '@typescript-eslint'
13 changes: 12 additions & 1 deletion tests/services/test_language_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from secureli.services.language_config import (
LanguageConfigService,
LanguageNotSupportedError,
LoadLinterConfigsResult,
)


Expand Down Expand Up @@ -54,7 +55,6 @@ def test_that_version_identifiers_are_calculated_for_known_languages(

def test_that_language_config_service_templates_are_loaded_with_global_exclude_if_provided_multiple_patterns(
language_config_service: LanguageConfigService,
mock_data_loader: MagicMock,
):
language_config_service.ignored_file_patterns = [
"mock_pattern1",
Expand All @@ -74,6 +74,17 @@ def test_that_language_config_service_templates_are_loaded_without_exclude(
assert "exclude:" not in result.config_data


def test_that_language_config_service_templates_are_loaded_without_linter_config_if_include_linter_is_false(
language_config_service: LanguageConfigService,
):
language_config_service.ignored_file_patterns = []
result = language_config_service.get_language_config("Python", False)

assert result.linter_config == LoadLinterConfigsResult(
successful=True, linter_data=[]
)


def test_that_language_config_service_does_nothing_when_pre_commit_settings_is_empty(
language_config_service: LanguageConfigService,
mock_data_loader: MagicMock,
Expand Down

0 comments on commit d87e468

Please sign in to comment.