Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Lint phantomjs runner
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 30 Sep 2012 13:12:38 +0000 (15:12 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 30 Sep 2012 13:12:38 +0000 (15:12 +0200)
addons/phantomjs/runner.js

index fdc8242..3fa676b 100644 (file)
  *      phantomjs runner.js http://localhost/qunit/test
  */
 
-var url = phantom.args[0];
-
-var page = require('webpage').create();
+/*jshint latedef:false */
+/*global phantom:true require:true console:true */
+var url = phantom.args[0],
+       page = require('webpage').create();
 
 // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
 page.onConsoleMessage = function(msg) {
@@ -55,8 +56,8 @@ function addLogging() {
                var current_test_assertions = [];
 
                QUnit.testDone(function(result) {
-                       var name = result.module + ': ' + result.name;
-                       var i;
+                       var i,
+                               name = result.module + ': ' + result.name;
 
                        if (result.failed) {
                                console.log('Assertion Failed: ' + name);

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf