remove AbsolutePath.exists
This commit is contained in:
parent
9c89fe7847
commit
a599a50532
|
@ -22,6 +22,8 @@ import XCTest
|
|||
|
||||
final class BundleCommandTests: XCTestCase {
|
||||
func testWithNoArguments() async throws {
|
||||
let fs = localFileSystem
|
||||
|
||||
try await withFixture("EchoExecutable") { packageDirectory in
|
||||
let bundleDirectory = packageDirectory.appending(component: "Bundle")
|
||||
|
||||
|
@ -29,7 +31,7 @@ final class BundleCommandTests: XCTestCase {
|
|||
try result.checkNonZeroExit()
|
||||
|
||||
// Confirm that the files are actually in the folder
|
||||
XCTAssertTrue(bundleDirectory.exists, "The Bundle directory should exist")
|
||||
XCTAssertTrue(fs.isDirectory(bundleDirectory), "The Bundle directory should exist")
|
||||
XCTAssertTrue(bundleDirectory.ls().contains("index.html"), "Bundle does not have index.html")
|
||||
XCTAssertFalse(
|
||||
(bundleDirectory.ls().filter { $0.contains("wasm") }).isEmpty,
|
||||
|
|
|
@ -58,10 +58,6 @@ func withFixture(_ name: String, _ body: (AbsolutePath) async throws -> Void) as
|
|||
}
|
||||
|
||||
extension AbsolutePath {
|
||||
var exists: Bool {
|
||||
FileManager.default.fileExists(atPath: pathString)
|
||||
}
|
||||
|
||||
func ls() -> [String] {
|
||||
guard let paths = try? FileManager.default.subpathsOfDirectory(atPath: pathString)
|
||||
else { return [] }
|
||||
|
|
Loading…
Reference in New Issue