Skip to content

Commit a5182a2

Browse files
authored
[js/web] update test condition for '--force-localhost' (#20450)
### Description Fixes the NPM packaging pipeline failure.
1 parent 9cc5bad commit a5182a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/web/script/test-runner-cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,9 @@ async function main() {
558558
if (args.noSandbox) {
559559
karmaArgs.push('--no-sandbox');
560560
}
561-
if (webgpu || webnn) {
561+
562+
// When using BrowserStack with Safari, we need NOT to use 'localhost' as the hostname.
563+
if (!(browser.startsWith('BS_') && browser.includes('Safari'))) {
562564
karmaArgs.push('--force-localhost');
563565
}
564566
if (webgpu) {

0 commit comments

Comments
 (0)