Skip to content

Commit

Permalink
Test for AMD support.
Browse files Browse the repository at this point in the history
  • Loading branch information
meltuhamy committed Apr 25, 2014
1 parent 6621688 commit 76e26b1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"helper": true,
"tv4": true,
"assert": true,
"define": true,
"require": true
"define": true,
"require": true
}
}
31 changes: 31 additions & 0 deletions test/index-require.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>tv4</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="./deps/mocha.css"/>
<script src="./deps/jquery.js"></script>
<script src="./deps/mocha.js"></script>
<script src="./deps/proclaim.js"></script>
<script src="../node_modules/requirejs/require.js"></script>
<script>
mocha.setup('bdd');
window.onload = function () {
if (navigator.userAgent.indexOf('PhantomJS') < 0) {
mocha.run();
}
};
describe("tv4 amd loading", function(){
it("should load tv4 using require", function(done){
require(['../tv4'], function(tv4){
proclaim.isDefined(tv4);
done();
});
});
});
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>

0 comments on commit 76e26b1

Please sign in to comment.