diff --git a/tested/languages/typescript/generators.py b/tested/languages/typescript/generators.py index 13718422..d554b687 100644 --- a/tested/languages/typescript/generators.py +++ b/tested/languages/typescript/generators.py @@ -136,8 +136,6 @@ def convert_function_call(call: FunctionCall, internal=False) -> str: def convert_declaration(statement: Statement, tp: AllTypes | VariableType) -> str: if isinstance(tp, VariableType): return f"{tp.data}" - elif tp == AdvancedNothingTypes.NULL: - return "null" elif tp == AdvancedNothingTypes.UNDEFINED: return "undefined" diff --git a/tests/test_language_quircks.py b/tests/test_language_quircks.py index d0c2d42f..e5ef4957 100644 --- a/tests/test_language_quircks.py +++ b/tests/test_language_quircks.py @@ -55,9 +55,12 @@ def test_typescript_set_typing(tmp_path: Path, pytestconfig: pytest.Config): def test_typescript_function_call_typing(tmp_path: Path, pytestconfig: pytest.Config): statement_string = "test = {'test', True, testing(10)}" result = convert_statement(parse_string(statement_string), full=True) - assert result == 'let test : Set = new Set(["test", true, testing(10)])' + statement_string = "test = ['test', True, testing(10)]" + result = convert_statement(parse_string(statement_string), full=True) + assert result == 'let test : Array = ["test", true, testing(10)]' + def test_javascript_vanilla_object(tmp_path: Path, pytestconfig: pytest.Config): conf = configuration(