(t *testing.T)
| 422 | } |
| 423 | |
| 424 | func TestSharedState_GetJSON_UnmarshalError(t *testing.T) { |
| 425 | t.Parallel() |
| 426 | |
| 427 | store := newSharedStateMemoryStorage(t) |
| 428 | app := New(Config{SharedStorage: store}) |
| 429 | |
| 430 | storageKey, ok := app.SharedState().storageKey("broken") |
| 431 | require.True(t, ok) |
| 432 | require.NoError(t, store.Set(storageKey, []byte("{"), 0)) |
| 433 | |
| 434 | var out map[string]any |
| 435 | _, found, err := app.SharedState().GetJSON("broken", &out) |
| 436 | require.False(t, found) |
| 437 | require.Error(t, err) |
| 438 | } |
| 439 | |
| 440 | func TestSharedState_Get_ReturnsCopy(t *testing.T) { |
| 441 | t.Parallel() |
nothing calls this directly
no test coverage detected