Documentation
¶
Overview ¶
Package harness compares this compiler's output against the reference implementation, babel-preset-solid.
The two agree on semantics but not on spelling, so comparison is layered: templates, the helper set, and the delegated event set must match exactly; statement bodies are compared after normalizing generated variable names, equivalent accessor forms, and DOM navigation paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeBody ¶
NormalizeBody reduces generated code to a form where only meaningful differences remain: generated variables are alpha-renamed, equivalent accessor spellings are collapsed, comments and whitespace are removed, and DOM navigation is expanded to root-relative paths.
Types ¶
type Mismatch ¶
type Mismatch struct {
// Kind is "template", "helpers", "events", or "body".
Kind string
Reference string
Actual string
Detail string
}
Mismatch is a single difference, categorized as "template", "helpers", "events", or "body".
type Output ¶
type Output struct {
// Templates are the hoisted HTML strings, in declaration order, with
// template-literal escaping removed.
Templates []string
// Helpers are the runtime helpers imported, sorted.
Helpers []string
// Delegated are the event names registered for delegation, sorted.
Delegated []string
// Body is everything else, normalized.
Body string
}
Output is the structured content extracted from a generated module.