Preserve empty string slot values in renderToString so explicit empty slots still render as empty containers.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
15 lines
351 B
Go
15 lines
351 B
Go
//go:build !js
|
|
|
|
// SPDX-Licence-Identifier: EUPL-1.2
|
|
|
|
package main
|
|
|
|
import "testing"
|
|
|
|
func TestRenderLayout_EmptyStringSlot_Good(t *testing.T) {
|
|
got := renderLayout("C", "en-GB", map[string]string{"C": ""})
|
|
want := `<main role="main" data-block="C"></main>`
|
|
if got != want {
|
|
t.Fatalf("renderLayout with empty slot = %q, want %q", got, want)
|
|
}
|
|
}
|