jshint 1.0.0 compliance
Showing
41 changed files
with
45 additions
and
44 deletions
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * Create a mosaic image from all headline photos on BBC homepage | 5 | * Create a mosaic image from all headline photos on BBC homepage | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | var casper = require("casper").create(); | 4 | var casper = require("casper").create(); |
5 | var dump = require("utils").dump; | 5 | var dump = require("utils").dump; | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * A basic custom logging implementation. The idea is to (extremely) verbosely | 5 | * A basic custom logging implementation. The idea is to (extremely) verbosely | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * This script will add a custom HTTP status code handler, here for 404 pages. | 5 | * This script will add a custom HTTP status code handler, here for 404 pages. | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * Takes provided terms passed as arguments and query google for the number of | 5 | * Takes provided terms passed as arguments and query google for the number of | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | var casper = require("casper").create(); | 4 | var casper = require("casper").create(); |
5 | var url = casper.cli.get(0); | 5 | var url = casper.cli.get(0); | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * This script will capture a screenshot of a twitter account page | 5 | * This script will capture a screenshot of a twitter account page | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | 2 | /*global CasperError, console, phantom, require*/ |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * This script will add a custom HTTP status code handler, here for 404 pages. | 5 | * This script will add a custom HTTP status code handler, here for 404 pages. | ... | ... |
1 | /*global phantom CasperError patchRequire*/ | 1 | /*global phantom, CasperError, patchRequire, require:true, casper:true*/ |
2 | 2 | ||
3 | if (!phantom.casperLoaded) { | 3 | if (!phantom.casperLoaded) { |
4 | console.log('This script must be invoked using the casperjs executable'); | 4 | console.log('This script must be invoked using the casperjs executable'); | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements:99*/ | 2 | /*jshint strict:false, maxstatements:99*/ |
3 | 3 | ||
4 | casper.test.begin('HTTP authentication tests', 8, function(test) { | 4 | casper.test.begin('HTTP authentication tests', 8, function(test) { |
5 | casper.start('tests/site/index.html'); | 5 | casper.start('tests/site/index.html'); | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements: 99*/ | 2 | /*jshint strict:false, maxstatements: 99*/ |
3 | var utils = require('utils'); | 3 | var utils = require('utils'); |
4 | 4 | ||
5 | casper.test.begin('click() tests', 2, function(test) { | 5 | casper.test.begin('click() tests', 2, function(test) { | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxparams:99*/ | 2 | /*jshint strict:false, maxparams:99*/ |
3 | casper.test.begin('mapping argument context', 1, function(test) { | 3 | casper.test.begin('mapping argument context', 1, function(test) { |
4 | casper.start(); | 4 | casper.start(); |
5 | var context = { | 5 | var context = { | ... | ... |
1 | /*global casper __utils__*/ | 1 | /*global casper, __utils__*/ |
2 | /*jshint strict:false*/ | 2 | /*jshint strict:false*/ |
3 | casper.test.begin('handling frames', 16, function(test) { | 3 | casper.test.begin('handling frames', 16, function(test) { |
4 | casper.start('tests/site/frames.html'); | 4 | casper.start('tests/site/frames.html'); | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | casper.test.begin('sendKeys() tests', 2, function(test) { | 3 | casper.test.begin('sendKeys() tests', 2, function(test) { |
4 | casper.start('tests/site/form.html', function() { | 4 | casper.start('tests/site/form.html', function() { |
5 | this.sendKeys('input[name="email"]', 'duke@nuk.em'); | 5 | this.sendKeys('input[name="email"]', 'duke@nuk.em'); | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | var utils = require('utils') | 3 | var utils = require('utils') |
4 | 4 | ||
5 | if (utils.ltVersion(phantom.version, '1.8.0')) { | 5 | if (utils.ltVersion(phantom.version, '1.8.0')) { | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global casper __utils__*/ | 2 | /*global casper, __utils__*/ |
3 | casper.test.begin('logging tests', 4, function(test) { | 3 | casper.test.begin('logging tests', 4, function(test) { |
4 | casper.start('tests/site/index.html'); | 4 | casper.start('tests/site/index.html'); |
5 | 5 | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements:99*/ | 2 | /*jshint strict:false, maxstatements:99*/ |
3 | casper.test.begin('mouseEvent() tests', 16, function(test) { | 3 | casper.test.begin('mouseEvent() tests', 16, function(test) { |
4 | casper.start('tests/site/mouse-events.html', function() { | 4 | casper.start('tests/site/mouse-events.html', function() { |
5 | test.assert(this.mouseEvent('mousedown', '#test1'), 'Casper.mouseEvent() can dispatch a mousedown event'); | 5 | test.assert(this.mouseEvent('mousedown', '#test1'), 'Casper.mouseEvent() can dispatch a mousedown event'); | ... | ... |
1 | /*jshint strict:false maxstatements:99*/ | 1 | /*jshint strict:false, maxstatements:99*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | var utils = require('utils'); | 3 | var utils = require('utils'); |
4 | var x = require('casper').selectXPath; | 4 | var x = require('casper').selectXPath; |
5 | 5 | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements:99*/ | 2 | /*jshint strict:false, maxstatements:99*/ |
3 | var cli = require('cli'); | 3 | var cli = require('cli'); |
4 | 4 | ||
5 | casper.test.begin('parsing an empty argument list', 12, function(test) { | 5 | casper.test.begin('parsing an empty argument list', 12, function(test) { | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements:99*/ | 2 | /*jshint strict:false, maxstatements:99*/ |
3 | var pagestack = require('pagestack'); | 3 | var pagestack = require('pagestack'); |
4 | var utils = require('utils'); | 4 | var utils = require('utils'); |
5 | var webpage = require('webpage'); | 5 | var webpage = require('webpage'); | ... | ... |
1 | /*global casper*/ | 1 | /*global casper*/ |
2 | /*jshint strict:false maxstatements:99*/ | 2 | /*jshint strict:false, maxstatements:99*/ |
3 | var fs = require('fs'); | 3 | var fs = require('fs'); |
4 | 4 | ||
5 | casper.test.begin('Common assertions tests', 43, function(test) { | 5 | casper.test.begin('Common assertions tests', 43, function(test) { | ... | ... |
1 | /*jshint strict:false eqeqeq:false*/ | 1 | /*jshint strict:false, eqeqeq:false*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | var steps = []; | 3 | var steps = []; |
4 | 4 | ||
5 | casper.test.begin('Tester.begin() configuration', 10, { | 5 | casper.test.begin('Tester.begin() configuration', 10, { | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | var fs = require('fs'); | 3 | var fs = require('fs'); |
4 | 4 | ||
5 | casper.test.begin('Tester.sortFiles()', 1, function suite(test) { | 5 | casper.test.begin('Tester.sortFiles()', 1, function suite(test) { | ... | ... |
1 | /*jshint strict:false maxstatements:99 maxcomplexity:99 */ | 1 | /*jshint strict:false, maxstatements:99, maxcomplexity:99*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | 3 | ||
4 | var TestCaseResult = require('tester').TestCaseResult; | 4 | var TestCaseResult = require('tester').TestCaseResult; |
5 | 5 | ... | ... |
1 | /*jshint strict:false*/ | 1 | /*jshint strict:false*/ |
2 | /*global CasperError casper console phantom require*/ | 2 | /*global CasperError, casper, console, phantom, require*/ |
3 | 3 | ||
4 | var TestCaseResult = require('tester').TestCaseResult, | 4 | var TestCaseResult = require('tester').TestCaseResult, |
5 | TestSuiteResult = require('tester').TestSuiteResult; | 5 | TestSuiteResult = require('tester').TestSuiteResult; | ... | ... |
-
Please register or sign in to post a comment