public
Created

phantomjs qunit

  • Download Gist
index.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>QUnit Example</title>
<link rel="stylesheet" href="/qunit.css">
</head>
<body>
<div id="qunit"></div>
<script src="/qunit.js"></script>
<script src="/tests.js"></script>
</body>
</html>
readme.rst
reStructuredText

For this example

  • install phantomjs
  • install twisted
  • make an empty directory
  • download qunit.js and qunit.css into that directory
  • download https://github.com/ariya/phantomjs/blob/1.2/examples/run-qunit.js into that directory
  • add index.html and tests.js from below to that directory
  • run twistd web --path=. --port=8080 && phantomjs run-qunit.js http://localhost:8080 && kill `cat twistd.pid`
tests.js
JavaScript
1 2 3
test( "hello test", function() {
ok( 1 == "1", "Passed!" );
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.