UNPKG

@seanox/aspect-js

Version:

full stack JavaScript framework for SPAs incl. reactivity rendering, mvc / mvvm, models, expression language, datasource, virtual paths, unit test and some more

42 lines (39 loc) 1.05 kB
<!DOCTYPE HTML> <html> <head> <meta charset="ISO-8859-1"> <title>Seanox aspect-js test environment</title> <style> body { font-family: monospace; } body div { margin: 1em; } body * { display: block; } </style> <script src="aspect-js.js"></script> <script src="scripts/capture.js"></script> <script type="text/javascript"> Test.activate(); const capture = new Capture(); Composite.listen(Composite.EVENT_RENDER_END, () => { capture.snap(); const count = capture.patterns().length; if (capture.size() === count) Test.start(); if (capture.size() > count) Assert.assertEquals("expected {1} steps but was {2}", count, capture.size()); }); Test.create({test() { capture.validate(); }}); </script> <script type="text/test"> </script> </head> <body> </body> </html>