Permalink
Browse files

Added beginnings of test runner - still need Rei.initialize() to take…

… a callback
  • Loading branch information...
1 parent aa95fc8 commit 9a2a6856beeb2f9954a0a32ac8aacc62a24b0832 @yozlet yozlet committed with Jul 31, 2012
Showing with 8,306 additions and 0 deletions.
  1. +37 −0 app/test.html
  2. +3,473 −0 app/tests/chai.js
  3. +199 −0 app/tests/mocha.css
  4. +4,579 −0 app/tests/mocha.js
  5. +18 −0 app/tests/test.dummy.js
View
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Rei Tests</title>
+ <!-- Test framework -->
+ <script src="tests/mocha.js"></script>
+ <script src="tests/chai.js"></script>
+ <script>mocha.setup('bdd')</script>
+
+ <script src="scripts/require-jquery.js"></script>
+ <script src="tests/test.dummy.js"></script>
+ <script>
+ $(function(){
+ requirejs.config({
+ baseUrl: 'scripts'
+ });
+ requirejs(['./rei'], function(rei) {
+ window.Rei = rei;
+ var runner = mocha.run();
+ runner.globals(['PLUGINS', 'jQuery', 'chai', 'Rei', 'word']);
+
+ runner.on('test end', function(test){
+ console.log(test.fullTitle());
+ });
+ });
+ });
+ </script>
+
+
+ <link rel="stylesheet" type="text/css" href="tests/mocha.css"/>
+
+ </head>
+ <body>
+ <div id="mocha"></div>
+ </div>
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 9a2a685

Please sign in to comment.