---
format: html
_quarto:
  tests:
    html:
      ensureHtmlElements:
        - ["th[colspan=\"2\"]"]
        - []
---

```{r}
#| include: false
library(gt)
```

```{r}
#| echo: false
#| tbl-cap: "Caption"
#| label: tbl-test
dat <- data.frame(
  a = c("A", "B"),
  x = c(1, 2),
  y = c(12, 9),
  z = c(13, 11)
)

dat %>%
  gt() %>%
  tab_spanner(
    label = "Subheader",
    columns = c(x, y)
  )
```

@tbl-test