Skip to content

Commit

Permalink
core: await js-libraries detection (#6141)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Sep 28, 2018
1 parent 08db099 commit 8b8cdbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ module.exports = [
],
},
},
'js-libraries': {
score: 1,
details: {
items: [{
name: 'jQuery',
}],
},
},
},
},
];
4 changes: 2 additions & 2 deletions lighthouse-core/gather/gatherers/dobetterweb/js-libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ function detectLibraries() {
// d41d8cd98f00b204e9800998ecf8427e_ is a consistent prefix used by the detect libraries
// see https://github.com/HTTPArchive/httparchive/issues/77#issuecomment-291320900
// @ts-ignore - injected libDetectorSource var
Object.entries(d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests).forEach(([name, lib]) => {
Object.entries(d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests).forEach(async ([name, lib]) => { // eslint-disable-line max-len
try {
const result = lib.test(window);
const result = await lib.test(window);
if (result) {
libraries.push({
name: name,
Expand Down

0 comments on commit 8b8cdbb

Please sign in to comment.