adding check for super()

This commit is contained in:
metacryst
2024-03-20 18:04:13 +01:00
parent c0ccb138d1
commit f0d04d9f0d
2 changed files with 31 additions and 12 deletions

View File

@@ -27,6 +27,23 @@ testParseConstructorIfNoneProvided() {
}
}
testParseConstructorFailsIfNoSuper() {
class Space extends Shadow {
form
contents = []
constructor() {
}
}
try {
let newClass = window.Registry.parseConstructor(Space)
return "No error thrown!"
} catch(e) {
}
}
testParseClassFieldsWithNoDefault() {
class Space extends Shadow {
form