Skip to content

Commit

Permalink
test: use path.join to join path to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Apr 20, 2024
1 parent 1ee2f65 commit 802976b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'use strict';

const os = require('os');
const path = require('path');
const puppeteerBrowsers = require('@puppeteer/browsers');

async function download(browser, version, cacheDir, platform) {
Expand All @@ -20,11 +21,12 @@ async function download(browser, version, cacheDir, platform) {
cacheDir,
platform
});
console.error(browser, version, platform, buildId);
return buildId;
}

module.exports = async(config) => {
const cacheDir = process.cwd() + '/browsers';
const cacheDir = path.join(process.cwd(), 'browsers');
const platform = puppeteerBrowsers.detectBrowserPlatform();

let browsers;
Expand All @@ -43,6 +45,7 @@ module.exports = async(config) => {
} else {
browsers = ['chrome', 'firefox'];
}
console.error('BROWSERS', browsers);

let reporters = ['mocha'];
if (process.env.CI) {
Expand Down

0 comments on commit 802976b

Please sign in to comment.