Comparing version 4.1.1 to 4.2.0
# Changelog | ||
## 4.2.0 (2016-11-25) | ||
* Display the page title in the logs to help with debugging | ||
## 4.1.1 (2016-11-24) | ||
@@ -5,0 +9,0 @@ |
@@ -24,3 +24,4 @@ 'use strict'; | ||
done({ | ||
messages: processMessages(window.HTMLCS.getMessages()) | ||
messages: processMessages(window.HTMLCS.getMessages()), | ||
documentTitle: window.document.title || '' | ||
}); | ||
@@ -27,0 +28,0 @@ } |
@@ -66,2 +66,3 @@ 'use strict'; | ||
} | ||
options.log.debug('Document title: "' + result.documentTitle + '"'); | ||
done(null, result.messages); | ||
@@ -68,0 +69,0 @@ }); |
114
package.json
{ | ||
"name": "pa11y", | ||
"version": "4.1.1", | ||
"description": "Pa11y is your automated accessibility testing pal", | ||
"keywords": [ "accessibility", "analysis", "cli", "report" ], | ||
"author": "Nature Publishing Group", | ||
"contributors": [ | ||
"Rowan Manning (http://rowanmanning.com/)", | ||
"Whymarrh Whitby (http://whymarrh.com/)", | ||
"Stephen Mathieson (http://www.stephenmathieson.com/)", | ||
"Alex Soble (http://www.alexsoble.com/)", | ||
"Charlie Brown (http://www.carbonatethis.com/)", | ||
"Hollie Kay (http://www.hollsk.co.uk/)", | ||
"Adam Tavener (http://www.tavvy.co.uk/)", | ||
"Glynn Phillips (http://www.glynnphillips.co.uk/)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pa11y/pa11y.git" | ||
}, | ||
"homepage": "https://github.com/pa11y/pa11y", | ||
"bugs": "https://github.com/pa11y/pa11y/issues", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"dependencies": { | ||
"async": "~1.4", | ||
"bfj": "~1.2", | ||
"chalk": "~1.1", | ||
"commander": "~2.8", | ||
"lower-case": "~1.1", | ||
"node.extend": "~1.1", | ||
"once": "~1.3", | ||
"phantomjs-prebuilt": "^2.1.12", | ||
"truffler": "~3.0" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "~0.3", | ||
"jscs": "^2", | ||
"jshint": "^2", | ||
"mocha": "^3", | ||
"mockery": "~1.4", | ||
"proclaim": "^3", | ||
"sinon": "^1" | ||
}, | ||
"main": "./lib/pa11y.js", | ||
"bin": { | ||
"pa11y": "./bin/pa11y" | ||
}, | ||
"scripts": { | ||
"test": "make ci" | ||
} | ||
"name": "pa11y", | ||
"version": "4.2.0", | ||
"description": "Pa11y is your automated accessibility testing pal", | ||
"keywords": [ | ||
"accessibility", | ||
"analysis", | ||
"cli", | ||
"report" | ||
], | ||
"author": "Nature Publishing Group", | ||
"contributors": [ | ||
"Rowan Manning (http://rowanmanning.com/)", | ||
"Whymarrh Whitby (http://whymarrh.com/)", | ||
"Stephen Mathieson (http://www.stephenmathieson.com/)", | ||
"Alex Soble (http://www.alexsoble.com/)", | ||
"Charlie Brown (http://www.carbonatethis.com/)", | ||
"Hollie Kay (http://www.hollsk.co.uk/)", | ||
"Adam Tavener (http://www.tavvy.co.uk/)", | ||
"Glynn Phillips (http://www.glynnphillips.co.uk/)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pa11y/pa11y.git" | ||
}, | ||
"homepage": "https://github.com/pa11y/pa11y", | ||
"bugs": "https://github.com/pa11y/pa11y/issues", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"dependencies": { | ||
"async": "~1.4", | ||
"bfj": "~1.2", | ||
"chalk": "~1.1", | ||
"commander": "~2.8", | ||
"lower-case": "~1.1", | ||
"node.extend": "~1.1", | ||
"once": "~1.3", | ||
"phantomjs-prebuilt": "^2.1.12", | ||
"truffler": "~3.0" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "~0.3", | ||
"jscs": "^2", | ||
"jshint": "^2", | ||
"mocha": "^3", | ||
"mockery": "~1.4", | ||
"proclaim": "^3", | ||
"sinon": "^1" | ||
}, | ||
"main": "./lib/pa11y.js", | ||
"bin": { | ||
"pa11y": "./bin/pa11y" | ||
}, | ||
"scripts": { | ||
"test": "make ci" | ||
} | ||
} |
@@ -33,2 +33,11 @@ // jshint maxstatements: false | ||
it('should return result with messages and documentTitle properties', function(done) { | ||
window.HTMLCS.getMessages.returns([]); | ||
inject(window, options, function(result) { | ||
assert.isDefined(result.messages); | ||
assert.isDefined(result.documentTitle); | ||
done(); | ||
}); | ||
}); | ||
it('should ignore messages when they are a child of `options.hideElements`', function(done) { | ||
@@ -35,0 +44,0 @@ options.hideElements = '.hide'; |
@@ -421,2 +421,32 @@ // jshint maxstatements: false | ||
describe('testPage function', function() { | ||
var expectedResults, options, testFunction; | ||
beforeEach(function(done) { | ||
options = { | ||
log: { | ||
debug: sinon.spy() | ||
} | ||
}; | ||
pa11y(options); | ||
expectedResults = { | ||
documentTitle: 'quux' | ||
}; | ||
phantom.mockPage.evaluate = sinon.spy(function() { | ||
phantom.mockPage.onCallback(expectedResults); | ||
}); | ||
testFunction = truffler.firstCall.args[1]; | ||
done(); | ||
}); | ||
it('should call debug log with document title', function(done) { | ||
testFunction(phantom.mockBrowser, phantom.mockPage, extend.firstCall.returnValue, function() { | ||
assert.calledWith(options.log.debug, 'Document title: "quux"'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
252949
2644