Skip to content

Commit

Permalink
updated tests for the second time
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentBlanckaert committed Dec 11, 2024
1 parent 0982edc commit d51c11e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions tested/languages/typescript/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Check warning on line 140 in tested/languages/typescript/generators.py

View check run for this annotation

Codecov / codecov/patch

tested/languages/typescript/generators.py#L140

Added line #L140 was not covered by tests

Expand Down
5 changes: 4 additions & 1 deletion tests/test_language_quircks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> = 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<any> = ["test", true, testing(10)]'


def test_javascript_vanilla_object(tmp_path: Path, pytestconfig: pytest.Config):
conf = configuration(
Expand Down

0 comments on commit d51c11e

Please sign in to comment.