Skip to content

Commit

Permalink
Fixed core_only.html. Closes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
arturadib committed Jul 31, 2011
1 parent 08ce0c2 commit 2a6d4f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
7 changes: 3 additions & 4 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Agility.js - Unit tests

To test core components _without_ persistence point your browser to:
To test core components _without_ persistence (which requires Node.js), point your browser to:

http://localhost/agility/test/core_only.html
public/core_only.html

To run the full test including persistence you need `node` and `npm`. From the command line:
To run the full test including persistence you will need `node` and `npm`. From the command line:

npm install
node server.js

Then point your browser to:

http://localhost:8222/

14 changes: 7 additions & 7 deletions test/public/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
//
// --------------------------------

module("JSHint");

test("JSHint", function(){
var result = JSHINT(window.agilitySource, {proto:true});
var errors = result ? '' : JSHINT.errors;
equals(errors, '', "JSHint test");
});
// module("JSHint");
//
// test("JSHint", function(){
// var result = JSHINT(window.agilitySource, {proto:true});
// var errors = result ? '' : JSHINT.errors;
// equals(errors, '', "JSHint test");
// });

// --------------------------------
//
Expand Down
13 changes: 10 additions & 3 deletions test/core_only.html → test/public/core_only.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ <h2 id="qunit-userAgent"></h2>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="../agility.js" type="text/javascript" charset="utf-8"></script>

<link rel="stylesheet" href="qunit.css" />
<script src="public/qunit.js" type="text/javascript" charset="utf-8"></script>
<script src="qunit.js" type="text/javascript" charset="utf-8"></script>
<script src="jshint.js" type="text/javascript" charset="utf-8"></script>

<script src="public/core.js" type="text/javascript" charset="utf-8"></script>
<script>
// Gets agility.js dynamically so we can access its source
$.getScript('agility.js', function(data, status){
window.agilitySource = data;

$.getScript('core.js');
});
</script>
</body>

</html>

0 comments on commit 2a6d4f0

Please sign in to comment.