diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_transport_contracts.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_transport_contracts.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-hub/tests/test_transport_contracts.py b/packages/meshbay-hub/tests/test_transport_contracts.py index bb39966..0f0edb8 100644 --- a/packages/meshbay-hub/tests/test_transport_contracts.py +++ b/packages/meshbay-hub/tests/test_transport_contracts.py @@ -295,7 +295,9 @@ def test_no_setter_survives_the_state_it_belonged_to(): # `useState` behind it by design. Without this the rule reports every # such helper, and a rule that cries wolf is one someone eventually # silences. - defined = set(re.findall(r"^(?:async\s+)?function\s+(set[A-Z]\w*)\s*\(", app, re.M)) + # Nested too: a runner built by a factory (createBackup) keeps its + # own `setState` inside it. + defined = set(re.findall(r"^\s*(?:async\s+)?function\s+(set[A-Z]\w*)\s*\(", app, re.M)) defined |= set(re.findall(r"^\s*const\s+(set[A-Z]\w*)\s*=", app, re.M)) # A setter named in a `function Component({ ..., setX, ... })` prop # list is handed down from wherever it is really declared. |