test_call_sites_in_fold_shape

Tests › tests/test_jsts.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. sites = harvest_calls(_tree("typescript", TS), TS, "ast", "ast_member", "binding")
  2. as_set = {tuple(s) for s in sites}
→

When

  1. —
→

Then

  1. ✓ as_set contains ("clean", 10, "ast_member", "Formatter.clean", "")
  2. ✓ as_set contains ("trim", 10, "ast_member", "", "", -1, 0, 0)
  3. ✓ as_set contains ("normalize", 12, "ast", "", "")
  4. ✓ as_set contains ("constructor", 14, "ast_member", "Formatter.constructor", "")
  5. ✓ as_set contains ("trim", 25, "ast_member", "", "f", -1, 0, 0)
  6. ✓ as_set contains ("normalize", 25, "binding")

tests/test_jsts.py:118 · its file's page

What it checks (6)

  1. assert ("clean", 10, "ast_member", "Formatter.clean", "") in as_set, "this.m() is qualified" not attributed
  2. assert ("trim", 10, "ast_member", "", "", -1, 0, 0) in as_set not attributed
  3. assert ("normalize", 12, "ast", "", "") in as_set not attributed
  4. assert ("constructor", 14, "ast_member", "Formatter.constructor", "") in as_set, "new C()" not attributed
  5. assert ("trim", 25, "ast_member", "", "f", -1, 0, 0) in as_set, "obj.m() carries its receiver" not attributed
  6. assert ("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→_tree

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 1 requirement

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