go-html/cmd/wasm/render_layout_test.go
Snider a02843a5ad
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
fix(wasm): render empty slot content
Preserve empty string slot values in renderToString so explicit empty slots still render as empty containers.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:42:50 +01:00

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)
}
}