@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
181 lines (176 loc) • 6.34 kB
HTML
<!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.body.innerHTML = "";
tests.forEach((test) => {
document.body.innerHTML = document.body.innerHTML.trim();
if (document.body.innerHTML)
document.body.innerHTML += "\r\n";
let lookup = SiteMap.lookup(test);
if (typeof lookup === "object")
lookup = lookup === null ? "null" : lookup.toPlainString();
document.body.innerHTML += "I: " + test
+ "\r\nO: " + lookup;
});
Assert.assertSameTo("script[type='text/test']", document.body.textContent);
}});
Test.start({auto:true});
</script>
<script type="text/test">
I:
O: {"path":"#","face":"#","facet":null}
I:
O: null
I:
O: {"path":"#projects","face":"#","facet":"projects"}
I:
O: null
I:
O: {"path":"#projects#devwex","face":"#projects#devwex","facet":null}
I:
O: null
I:
O: null
I:
O: {"path":"#projects#devwex#description","face":"#projects#devwex","facet":"description"}
I:
O: null
I:
O: null
I:
O: {"path":"#projects#devwex#features","face":"#projects#devwex","facet":"features"}
I:
O: {"path":"#projects#devwex#licence","face":"#projects#devwex","facet":"licence"}
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: {"path":"#projects#review","face":"#projects#review","facet":null}
I:
O: {"path":"#projects#review#description","face":"#projects#review","facet":"description"}
I:
O: {"path":"#projects#review#features","face":"#projects#review","facet":"features"}
I:
O: {"path":"#projects#review#licence","face":"#projects#review","facet":"licence"}
I:
O: {"path":"#projects#wotexx","face":"#projects#wotexx","facet":null}
I:
O: {"path":"#projects#wotexx#description","face":"#projects#wotexx","facet":"description"}
I:
O: {"path":"#projects#wotexx#features","face":"#projects#wotexx","facet":"features"}
I:
O: {"path":"#projects#wotexx#licence","face":"#projects#wotexx","facet":"licence"}
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: {"path":"#projects#aspect-js","face":"#projects#aspect-js","facet":null}
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: null
I:
O: {"path":"#","face":"#","facet":null}
</script>
</head>
<body>
</body>
</html>