State retrieves a state value from the test scope by its caller key.
(key string)
| 196 | |
| 197 | // State retrieves a state value from the test scope by its caller key. |
| 198 | func (rt *RenderedTree) State(key string) any { |
| 199 | rt.scope.mu.Lock() |
| 200 | defer rt.scope.mu.Unlock() |
| 201 | return rt.scope.states[key] |
| 202 | } |
| 203 | |
| 204 | type TextResult struct { |
| 205 | Value string |