hyTags
HomeHome DocumentationDocumentation

assert-equal

Asserts that two values are equal when converted to the specified type and displays a test result
Parameter
Type
Description
self
T
The first value to compare
value
T
The second value to compare
type
Type
The type to convert both values to before comparison
text
String?
Optional custom message to display in the test result
return
void
Displays a test result element showing pass or fail status with comparison details
Test Case:Assert equal passes for equal values
    <div></div>
    
    <number-new value="42">
    <assert-equal value="42" type="number">
    
    👆 Try to change something!
  • Test succeeded Test failed