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

281 lines (275 loc) 8.02 kB
<!DOCTYPE HTML> <html> <head> <meta charset="ISO-8859-1"> <title>Seanox aspect-js test environment</title> <style> body { font-family: monospace; white-space: pre; } </style> <script src="aspect-js.js"></script> <script type="text/javascript"> Test.activate(); SiteMap.customize({ "#": ["news", "projects", "seanox", "contact", "contact#about"], "#projects#aspect": ["description", "features", "licence", "requirement", "download"], "#projects#aspect-js": ["description", "features", "licence", "requirement", "download"], "#projects#devwex": ["description", "features", "licence", "requirement", "download"], "#projects#review": ["description", "features", "licence", "requirement", "download"], "#projects#roundup": ["description", "features", "licence", "requirement", "download"], "#projects#test": ["description", "features", "licence", "requirement", "download"], "#projects#wotexx": ["description", "features", "licence", "requirement", "download"], "#legal": ["terms", "privacy"], "#error": null }); const tests = [ "#", "#project", "#projects", "#projects#xyz", "#projects#devwex", "#projects#devwexx", "#projects#devwex#xyz", "#projects#devwex#description", "#projects#devwex#description#features", "#projects#devwex#description#features#licence", "#projects#devwex#features", "#projects#devwex#licence", "#projects#devwex#licence#x", "#projects#devwex#licence#x#y", "#projects#devwex#licence#x#y#z", "#projects#devwex#licence##x", "#projects#devwex#licence###x###y", "#projects#devwex#licence####x####y####z", "#projects#devwex#licence#1#2#3", "#projects#review", "#projects#review#description", "#projects#review#features", "#projects#review#licence", "#projects#wotexx", "#projects#wotexx#description", "#projects#wotexx#features", "#projects#wotexx#licence", "#projects#wotexx#licence#", "#projects#wotexx#licence##", "#projects#wotexx#licence###", "#projects#wotexx#licence####", "#projects#aspect-js", "#projects#aspect-js#", "#projects#aspect-js#1", "#projects#aspect-js#1#2", "#projects#aspect-js#1##2", "#x", "#x#", "#x##", "#x###", "#x####", "#" ]; Test.create({test() { document.location.href = "#"; document.body.innerHTML = ""; tests.forEach((test) => { document.body.innerHTML = document.body.innerHTML.trim(); if (document.body.innerHTML) document.body.innerHTML += "\r\n"; document.body.innerHTML += "I: " + test + "\r\nO: " + SiteMap.locate(test); }); Assert.assertSameTo("script[type='text/test1']", document.body.textContent); }}); Test.create({test() { SiteMap.forward("#projects"); document.body.innerHTML = ""; const filter = /^#projects#/; tests.forEach((test) => { document.body.innerHTML = document.body.innerHTML.trim(); if (document.body.innerHTML) document.body.innerHTML += "\r\n"; if (test.match(filter)) test = test.replace(filter, ""); document.body.innerHTML += "I: " + test + "\r\nO: " + SiteMap.locate(test); }); Assert.assertSameTo("script[type='text/test2']", document.body.textContent); }}); Test.start({auto:true}); </script> <script type="text/test1"> I: # O: # I: #project O: # I: #projects O: #projects I: #projects#xyz O: #projects I: #projects#devwex O: #projects#devwex I: #projects#devwexx O: #projects I: #projects#devwex#xyz O: #projects#devwex I: #projects#devwex#description O: #projects#devwex#description I: #projects#devwex#description#features O: #projects#devwex#description I: #projects#devwex#description#features#licence O: #projects#devwex#description I: #projects#devwex#features O: #projects#devwex#features I: #projects#devwex#licence O: #projects#devwex#licence I: #projects#devwex#licence#x O: #projects#devwex#licence I: #projects#devwex#licence#x#y O: #projects#devwex#licence I: #projects#devwex#licence#x#y#z O: #projects#devwex#licence I: #projects#devwex#licence##x O: #projects#devwex I: #projects#devwex#licence###x###y O: # I: #projects#devwex#licence####x####y####z O: # I: #projects#devwex#licence#1#2#3 O: #projects#devwex#licence I: #projects#review O: #projects#review I: #projects#review#description O: #projects#review#description I: #projects#review#features O: #projects#review#features I: #projects#review#licence O: #projects#review#licence I: #projects#wotexx O: #projects#wotexx I: #projects#wotexx#description O: #projects#wotexx#description I: #projects#wotexx#features O: #projects#wotexx#features I: #projects#wotexx#licence O: #projects#wotexx#licence I: #projects#wotexx#licence# O: #projects#wotexx#licence I: #projects#wotexx#licence## O: #projects#wotexx I: #projects#wotexx#licence### O: #projects I: #projects#wotexx#licence#### O: # I: #projects#aspect-js O: #projects#aspect-js I: #projects#aspect-js# O: #projects#aspect-js I: #projects#aspect-js#1 O: #projects#aspect-js I: #projects#aspect-js#1#2 O: #projects#aspect-js I: #projects#aspect-js#1##2 O: #projects#aspect-js I: #x O: # I: #x# O: # I: #x## O: # I: #x### O: # I: #x#### O: # I: # O: # </script> <script type="text/test2"> I: # O: # I: #project O: # I: #projects O: #projects I: xyz O: #projects I: devwex O: #projects#devwex I: devwexx O: #projects I: devwex#xyz O: #projects#devwex I: devwex#description O: #projects#devwex#description I: devwex#description#features O: #projects#devwex#description I: devwex#description#features#licence O: #projects#devwex#description I: devwex#features O: #projects#devwex#features I: devwex#licence O: #projects#devwex#licence I: devwex#licence#x O: #projects#devwex#licence I: devwex#licence#x#y O: #projects#devwex#licence I: devwex#licence#x#y#z O: #projects#devwex#licence I: devwex#licence##x O: #projects#devwex I: devwex#licence###x###y O: # I: devwex#licence####x####y####z O: # I: devwex#licence#1#2#3 O: #projects#devwex#licence I: review O: #projects#review I: review#description O: #projects#review#description I: review#features O: #projects#review#features I: review#licence O: #projects#review#licence I: wotexx O: #projects#wotexx I: wotexx#description O: #projects#wotexx#description I: wotexx#features O: #projects#wotexx#features I: wotexx#licence O: #projects#wotexx#licence I: wotexx#licence# O: #projects#wotexx#licence I: wotexx#licence## O: #projects#wotexx I: wotexx#licence### O: #projects I: wotexx#licence#### O: # I: aspect-js O: #projects#aspect-js I: aspect-js# O: #projects#aspect-js I: aspect-js#1 O: #projects#aspect-js I: aspect-js#1#2 O: #projects#aspect-js I: aspect-js#1##2 O: #projects#aspect-js I: #x O: # I: #x# O: # I: #x## O: # I: #x### O: # I: #x#### O: # I: # O: # </script> </head> <body> </body> </html>