about summary refs log tree commit diff stats
path: root/test/js/reflect.html
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/reflect.html')
-rw-r--r--test/js/reflect.html25
1 files changed, 12 insertions, 13 deletions
diff --git a/test/js/reflect.html b/test/js/reflect.html
index 45debe39..9b2ed4cb 100644
--- a/test/js/reflect.html
+++ b/test/js/reflect.html
@@ -1,18 +1,17 @@
 <!doctype html>
 <div id=abc>Fail</div>
 <a class=claz target="abcd">test test</a>
+<script src=asserts.js></script>
 <script>
-(function() {
-	let x = document.getElementById("abc")
-	let a = document.getElementsByTagName("a")[0];
-	if (a.target != "abcd") return;
-	a.target = "defg";
-	if (a.target != "defg") return;
-	if (a.relList != "") return;
-	a.relList = "...";
-	if (a.relList != "...") return;
-	if (a.className != "claz") return;
-	x.textContent = "Success";
-	a.remove(); /* ignore target... */
-})()
+const x = document.getElementById("abc")
+const a = document.getElementsByTagName("a")[0];
+assert_equals(a.target, "abcd");
+a.target = "defg";
+assert_equals(a.target, "defg");
+assert_equals(a.relList + "", "");
+a.relList = "...";
+assert_equals(a.relList + "", "...");
+assert_equals(a.className, "claz");
+x.textContent = "Success";
+a.remove(); /* ignore target... */
 </script>