Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Mar 28, 2017
1 parent f53654e commit dedb994
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lighthouse-core/audits/works-offline.js
Expand Up @@ -16,6 +16,7 @@
*/
'use strict';

const URL = require('../lib/url-shim');
const Audit = require('./audit');

class WorksOffline extends Audit {
Expand All @@ -40,9 +41,9 @@ class WorksOffline extends Audit {
*/
static audit(artifacts) {
let debugString;
if (artifacts.URL.initialUrl !== artifacts.URL.finalUrl) {
if (!URL.equalWithExcludedFragments(artifacts.URL.initialUrl, artifacts.URL.finalUrl)) {
debugString = 'WARNING: You may be failing this check because your test URL ' +
`(${artifacts.URL.initialUrl}) was redirected to ${artifacts.URL.finalUrl}. ` +
`(${artifacts.URL.initialUrl}) was redirected to "${artifacts.URL.finalUrl}". ` +
'Try testing the second URL directly.';
}

Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/audits/works-offline-test.js
Expand Up @@ -36,7 +36,7 @@ describe('Offline: works-offline audit', () => {
it('warns if initial url does not match final url', () => {
const output = Audit.audit({
Offline: 200,
URL: {initialUrl: URL, finalUrl: '${URL}/features'}
URL: {initialUrl: URL, finalUrl: `${URL}/features`}
});

assert.equal(output.rawValue, true);
Expand Down

0 comments on commit dedb994

Please sign in to comment.