Fixed issue with space separated rel attributes

Conflicts:
	lib/checks/check-pagination.js
	lib/checks/check-preload.js
This commit is contained in:
molant 2015-08-29 11:26:16 -07:00
Родитель 45bba60dca 246440b139
Коммит 21d71c82c4
4 изменённых файлов: 22 добавлений и 6 удалений

Просмотреть файл

@ -20,8 +20,8 @@
var bluebird = require('bluebird');
var check = bluebird.method(function (website) {
var next = website.$('link[rel="next"]'),
prev = website.$('link[rel="prev"]'),
var next = website.$('link[rel~="next"]'),
prev = website.$('link[rel~="prev"]'),
test = {
testName: 'pagination',
passed: false,

Просмотреть файл

@ -21,9 +21,9 @@
var bluebird = require('bluebird');
var check = bluebird.method(function (website) {
var prefetch = website.$('link[rel="prefetch"]'),
dnsPrerender = website.$('link[rel="dns-prefetch"]'),
prerender = website.$('link[rel="prerender"]'),
var prefetch = website.$('link[rel~="prefetch"]'),
dnsPrerender = website.$('link[rel~="dns-prefetch"]'),
prerender = website.$('link[rel~="prerender"]'),
test = {
testName: 'prefetch',
passed: false,

13
static/pagination-5.html Normal file
Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pagination</title>
<meta name="description" content="Pagination next with prefetch">
<link rel="next prefetch" href="next.html">
</head>
<body>
<h1>Pagination next with prefetch</h1>
<p>Expected result: <b>passes</b></p>
</body>
</html>

Просмотреть файл

@ -69,5 +69,8 @@ module.exports['Pagination'] = {
}),
'Pagination - Prev/Next': checkPage('4.html', {
passed: true
}),
'Pagination - Next with prefetch': checkPage('5.html', {
passed: true
})
};