Skip to content

Commit

Permalink
Merge 470655f into 52c41d1
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Aug 8, 2019
2 parents 52c41d1 + 470655f commit fe93458
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core.js
Expand Up @@ -62,7 +62,7 @@ function callPenthouse(document, options) {
}

if (user && pass) {
config.customPageHeaders = {...customPageHeaders, Authorization: 'Basic ' + token(user, pass)};
config.customPageHeaders = {...customPageHeaders, Authorization: `Basic ${token(user, pass)}`};
}

return sizes.map(({width, height}) => () => {
Expand Down Expand Up @@ -211,7 +211,7 @@ async function create(options = {}) {
const uncriticalHref = normalizePath(path.relative(document.cwd, path.resolve(base, target.uncritical)));
// Only replace stylesheets if the uncriticalHref is inside document.cwd and replaceStylesheets is not set via options
if (!/^\.\.\//.test(uncriticalHref) && replaceStylesheets === undefined) {
inline.replaceStylesheets = ['/' + uncriticalHref];
inline.replaceStylesheets = [`/${uncriticalHref}`];
}
} else {
inline.extract = extract;
Expand Down
2 changes: 1 addition & 1 deletion src/file.js
Expand Up @@ -306,7 +306,7 @@ async function fetch(uri, options = {}, secure = true) {

request.rejectUnauthorized = false;
if (user && pass) {
headers.Authorization = 'Basic ' + token(user, pass);
headers.Authorization = `Basic ${token(user, pass)}`;
}

if (userAgent) {
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox.test.js
Expand Up @@ -16,7 +16,7 @@ jest.setTimeout(60000);
process.chdir(path.resolve(__dirname));

function assertCritical(target, expected, done, skipTarget) {
return function(err, {css, html} = {}) {
return (err, {css, html} = {}) => {
const output = /\.css$/.test(target) ? css : html;

if (err) {
Expand Down
2 changes: 1 addition & 1 deletion test/file.test.js
Expand Up @@ -359,7 +359,7 @@ test('Get document from source with rebase option', async () => {
// expect.assertions(tests.length + 1);
for (const testdata of tests) {
const {filepath, expected} = testdata;
const rebase = {to: '/' + normalizePath(path.relative(base, filepath))};
const rebase = {to: `/${normalizePath(path.relative(base, filepath))}`};
const source = await fs.readFile(filepath);
const file = await getDocumentFromSource(source, {rebase, base});
expect(file.virtualPath).toBe(expected);
Expand Down

0 comments on commit fe93458

Please sign in to comment.