test_self_edge_rule_for_js_methods¶
Tests › tests/test_jsts.py
What this test is for
Given
src = b"""\ class A { m() { m(); this.m(); } } function f() { f(); } """
When
sites = set(_self_directed_sites(_tree("javascript", src), src))
Then
- ✓ sites contains ("m", 2)
- ✓ sites equals {("m", 2), ("f", 4)}
tests/test_jsts.py:135 · its file's page
What it checks (2)
assert ("m", 2) in sites, "this.m() inside m is self-directed"observes_self_directed_sitesviasitesassert sites == {("m", 2), ("f", 4)}, ( "a bare m() in a method is NOT the method (no implicit this)" )observes_self_directed_sitesviasites
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_self_edge_rule_for_js_methods→_self_directed_sites→_treeWhat 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-012 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured