838 B
838 B
WRNexusJS 0.7.0 R5 — Happy DOM element/event type alignment
Problem
R4 returned Happy DOM Event objects from the test helper, but two inputs were still cast to the browser DOM HTMLInputElement type. TypeScript therefore rejected the Happy DOM event at dispatchEvent().
Correction
packages/validation/test/validation.test.ts now imports and consistently uses Happy DOM types for:
EventIEventInitHTMLElementHTMLInputElementHTMLFormElement
The input, field, error and form nodes no longer use browser DOM global casts. Submit events also no longer cast back to the browser DOM Event type.
Regression gate
validate:0.7 now verifies that the validation tests use one Happy DOM type system and rejects the old as unknown as HTMLInputElement, HTMLFormElement, or HTMLElement casts.