MCPcopy
hub / github.com/gofiber/fiber / Test_App_ReloadViews_MountedViews_Error

Function Test_App_ReloadViews_MountedViews_Error

app_test.go:2448–2458  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2446}
2447
2448func Test_App_ReloadViews_MountedViews_Error(t *testing.T) {
2449 t.Parallel()
2450 expectedErr := errors.New("sub view error")
2451 subView := &countingView{loadErr: expectedErr}
2452 subApp := New(Config{Views: subView})
2453 app := New()
2454 app.Use("/sub", subApp)
2455
2456 err := app.ReloadViews()
2457 require.ErrorIs(t, err, expectedErr)
2458}
2459
2460func Test_App_ReloadViews_MountedViews_MultipleApps(t *testing.T) {
2461 t.Parallel()

Callers

nothing calls this directly

Calls 4

ReloadViewsMethod · 0.80
NewFunction · 0.70
NewMethod · 0.65
UseMethod · 0.65

Tested by

no test coverage detected