moving things, adding a test

This commit is contained in:
metacryst
2024-05-20 17:26:29 -05:00
parent 41ec6b7dd3
commit 65f79d1631
3 changed files with 80 additions and 53 deletions

View File

@@ -98,5 +98,29 @@ window.testSuites.push( class testState {
return "fail"
}
}
StateWorksWithCustomStyleFunctions() {
// reactive setting needs to use the actual style functions
register(class File extends Shadow {
$paraWidth = 16
render = () => {
p("guppy")
.width(this.paraWidth)
}
constructor() {
super()
}
}, randomName("file"))
const file = File()
file.paraWidth = 18
if(file.firstChild.style.width !== "18px") {
return "Width did not reactively change!"
}
}
})