Skip to content

Commit 72f26a6

Browse files
PackageToJS: Fix example tests on macOS
1 parent 80de55b commit 72f26a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Plugins/PackageToJS/Tests/ExampleTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ extension Trait where Self == ConditionTrait {
244244
try runProcess(which("npm"), ["install"], [:])
245245
try runProcess(which("npx"), ["playwright", "install", "chromium-headless-shell"], [:])
246246

247-
try runSwift(["package", "--swift-sdk", swiftSDKID, "js", "test"], [:])
247+
try runSwift(["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test"], [:])
248248
try withTemporaryDirectory(body: { tempDir, _ in
249249
let scriptContent = """
250250
const fs = require('fs');
@@ -255,7 +255,7 @@ extension Trait where Self == ConditionTrait {
255255
try scriptContent.write(to: tempDir.appending(path: "script.js"), atomically: true, encoding: .utf8)
256256
let scriptPath = tempDir.appending(path: "script.js")
257257
try runSwift(
258-
["package", "--swift-sdk", swiftSDKID, "js", "test", "-Xnode=--require=\(scriptPath.path)"],
258+
["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test", "-Xnode=--require=\(scriptPath.path)"],
259259
[:]
260260
)
261261
let testPath = tempDir.appending(path: "test.txt")
@@ -265,7 +265,7 @@ extension Trait where Self == ConditionTrait {
265265
"test.txt should be created by the script"
266266
)
267267
})
268-
try runSwift(["package", "--swift-sdk", swiftSDKID, "js", "test", "--environment", "browser"], [:])
268+
try runSwift(["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test", "--environment", "browser"], [:])
269269
}
270270
}
271271

0 commit comments

Comments
 (0)