1. Shlomi Fish
  2. abc-path

Commits

Shlomi Fish  committed bd29aa8

Moved the JS grand test function to a .js file to get better highlighting.

  • Participants
  • Parent commits 455ebde
  • Branches default

Comments (0)

Files changed (2)

File abc-path/js/abc-path-test.html

View file
  • Ignore whitespace
   <script src="http://code.jquery.com/jquery-latest.js"></script>
   <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
 <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+<script type="text/javascript" src="abc-path-test.js"></script>
 
   <script>
-  $(document).ready(function(){
-    
-test("a basic test example", function() {
-  ok( true, "this test is fine" );
-  var value = "hello";
-  equals( "hello", value, "We expect value to be hello" );
-});
-
-module("Module A");
-
-test("first test within module", function() {
-  ok( true, "all pass" );
-});
-
-test("second test within module", function() {
-  ok( true, "all pass" );
-});
-
-module("Module B");
-
-test("some other test", function() {
-  expect(2);
-  equals( true, true, "failing test" );
-  equals( true, true, "passing test" );
-});
-
-  });
+      $(document).ready(test_abc_path);
   </script>
   
 </head>

File abc-path/js/abc-path-test.js

View file
  • Ignore whitespace
+function test_abc_path()
+{
+
+    test("a basic test example", function() {
+        ok( true, "this test is fine" );
+        var value = "hello";
+        equals( "hello", value, "We expect value to be hello" );
+    });
+
+    module("Module A");
+
+    test("first test within module", function() {
+        ok( true, "all pass" );
+    });
+
+    test("second test within module", function() {
+        ok( true, "all pass" );
+    });
+
+    module("Module B");
+
+    test("some other test", function() {
+        expect(2);
+        equals( true, true, "failing test" );
+        equals( true, true, "passing test" );
+    });
+
+}