lasso-node
Version:
JavaScript widget and page unit testing with on the fly instrumentation
33 lines • 814 B
HTML
<html>
<head>
<meta charset="utf-8">
<title>Tutorial: DOH test</title>
</head>
<body>
<h1 id="greeting">Hello</h1>
<script>
var dojoConfig = {
async: false,
parseOnLoad: false,
isDebug: true,
baseUrl: ".",
tlmSiblingOfDojo: false,
packages: [
{
name: "src",
location: "src"
}]
};
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.2/dojo/dojo.js"></script>
<script>
require(['src/foo'], function (foo) {
console.log('using foo from foo.html', foo);
console.assert(typeof foo === 'function', 'foo is a function');
var result = foo();
console.assert(result === 'foo', 'foo returns correct value');
});
</script>
</body>
</html>