Merge pull request #467 from swiftwasm/katei/revert-b3844c1

Revert "Skips browser testing due to freezing"
This commit is contained in:
Yuta Saito 2024-05-22 13:13:55 +09:00 committed by GitHub
commit bde6016556
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 9 deletions

View File

@ -27,10 +27,6 @@ private enum Constants {
static let failTestPackageName = "FailTest"
}
func skipBrowserTest() throws {
throw XCTSkip("[FIXME] Running tests in the browser is currently disabled because it causes freezing")
}
final class TestCommandTests: XCTestCase {
func testWithNoArguments() async throws {
try await withFixture(Constants.testAppPackageName) { packageDirectory in
@ -79,7 +75,6 @@ final class TestCommandTests: XCTestCase {
}
func testHeadlessBrowser() async throws {
try skipBrowserTest()
guard Process.findExecutable("safaridriver") != nil else {
throw XCTSkip("WebDriver is required")
}
@ -93,12 +88,10 @@ final class TestCommandTests: XCTestCase {
}
func testHeadlessBrowserWithCrash() async throws {
try skipBrowserTest()
try await checkCartonTestFail(fixture: Constants.crashTestPackageName)
}
func testHeadlessBrowserWithFail() async throws {
try skipBrowserTest()
try await checkCartonTestFail(fixture: Constants.failTestPackageName)
}
@ -111,14 +104,13 @@ final class TestCommandTests: XCTestCase {
["carton", "test", "--environment", "browser", "--headless"],
packageDirectory: packageDirectory.url
)
try result.checkNonZeroExit()
XCTAssertNotEqual(result.exitStatus, .terminated(code: 0))
}
}
// This test is prone to hanging on Linux.
#if os(macOS)
func testEnvironmentDefaultBrowser() async throws {
try skipBrowserTest()
try await withFixture(Constants.testAppPackageName) { packageDirectory in
let expectedTestSuiteCount = 1
let expectedTestsCount = 1