test_interface_members_are_declarations

Tests › tests/test_ts_members.py

passed Passed in the packaged run.

What this test is for

Why it exists

A PLAIN DATA PROPERTY IS NOT ONE: `name: string` stays out.

Given

  1. out = harvest_definitions(lps.parse_tree("typescript", _SRC), _SRC)
  2. decls = {(f["cls"], f["name"]) for f in out["functions"] if f.get("decl")}
→

When

  1. —
→

Then

  1. ✓ decls equals {("UserService", "getUser"), ("UserService", "login")}

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

`main` (clew/guard/main.py) · 7 of 357 steps

… 127 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyother filesother filesother filesother filesloop (line 647)loopopt (line 658)optopt (line 377)optalt (line 380)altopt (line 383)optopt (line 384)optmain128. _append_declaration → _extract_signature128_extract_signature129. _collect_functions → _resolve_function_node129_resolve_function_node130. _resolve_function_node → _unwrap_decorated130_unwrap_decorated▶ test enters131. _resolve_function_node → _bound_function131_bound_function132–134. _collect_functions → _extract_function_name132_extract_function_name +2 more135. _function_carrier → _bound_function135_bound_function136. _collect_functions → _find_preceding_doxygen136_find_preceding_doxygen137. _find_preceding_doxygen → _preceding_node137_preceding_node▶ test enters138–140. _find_preceding_doxygen → _collect_rust_doc138_collect_rust_doc +2 more141. _find_preceding_doxygen → _collect_c_comment141_collect_c_comment142. _find_preceding_doxygen → _find_python_docstring_block142_find_python_docstring_block143. _find_preceding_doxygen → parse_doxygen_tags143parse_doxygen_tags

… 2 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyloop (line 647)loopopt (line 658)optopt (line 681)optopt (line 683)optmain146–147. _collect_functions → _qualified_enclosing146_qualified_enclosing +1 more148. _extract_signature → _function_carrier148_function_carrier▶ test enters149–151. _collect_functions → _js_returns_void149_js_returns_void +2 more152. _produced_class → _function_carrier152_function_carrier▶ test enters153–154. _collect_functions → _collect_functions153_collect_functions +1 more

… 203 later steps

tests/test_ts_members.py:58 · its file's page

What it checks (1)

  1. assert decls == {("UserService", "getUser"), ("UserService", "login")}, decls not attributed

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Also reaches 4 requirements

Its run touches their code; that is reach, not proof.