test_call_sites_in_fold_shape¶
Tests › tests/test_jsts.py
What this test is for
Why it exists
The test says nothing about why.
Given
sites = harvest_calls(_tree("typescript", TS), TS, "ast", "ast_member", "binding")as_set = {tuple(s) for s in sites}
When
- —
Then
- ✓ as_set contains ("clean", 10, "ast_member", "Formatter.clean", "")
- ✓ as_set contains ("trim", 10, "ast_member", "", "", -1, 0, 0)
- ✓ as_set contains ("normalize", 12, "ast", "", "")
- ✓ as_set contains ("constructor", 14, "ast_member", "Formatter.constructor", "")
- ✓ as_set contains ("trim", 25, "ast_member", "", "f", -1, 0, 0)
- ✓ as_set contains ("normalize", 25, "binding")
tests/test_jsts.py:118 · its file's page
What it checks (6)
assert ("clean", 10, "ast_member", "Formatter.clean", "") in as_set, "this.m() is qualified"not attributedassert ("trim", 10, "ast_member", "", "", -1, 0, 0) in as_setnot attributedassert ("normalize", 12, "ast", "", "") in as_setnot attributedassert ("constructor", 14, "ast_member", "Formatter.constructor", "") in as_set, "new C()"not attributedassert ("trim", 25, "ast_member", "", "f", -1, 0, 0) in as_set, "obj.m() carries its receiver"not attributedassert ("normalize", 25, "binding") in as_set, "a function passed by name is a binding"not attributed
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_call_sites_in_fold_shape→_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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-012 measured