fix(chromium runtime): encode Chromium test bundle names correctly for nested file paths
This commit is contained in:
@@ -531,7 +531,7 @@ import '${absoluteTestFile.replace(/\\/g, '/')}';
|
||||
|
||||
// lets get all our paths sorted
|
||||
const tsbundleCacheDirPath = plugins.path.join(paths.cwd, './.nogit/tstest_cache');
|
||||
const bundleFileName = fileNameArg.replace('/', '__') + '.js';
|
||||
const bundleFileName = fileNameArg.replaceAll('/', '__') + '.js';
|
||||
const bundleFilePath = plugins.path.join(tsbundleCacheDirPath, bundleFileName);
|
||||
|
||||
// lets bundle the test
|
||||
@@ -587,7 +587,7 @@ import '${absoluteTestFile.replace(/\\/g, '/')}';
|
||||
await this.smartbrowserInstance.start();
|
||||
|
||||
const evaluatePromise = this.smartbrowserInstance.evaluateOnPage(
|
||||
`http://localhost:${httpPort}/test?bundleName=${bundleFileName}`,
|
||||
`http://localhost:${httpPort}/test?bundleName=${encodeURIComponent(bundleFileName)}`,
|
||||
async () => {
|
||||
// lets enable real time comms
|
||||
const ws = new WebSocket(`ws://localhost:${globalThis.wsPort}`);
|
||||
|
||||
Reference in New Issue
Block a user