Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132import Foundationimport ParcelConfigimport Testing
@testable import ParcelApp
@MainActor @Suite("Activity app storage")struct AppActivityTests { @Test func productionStorageLivesInApplicationSupport() { guard ProcessInfo.processInfo.environment["PARCEL_ACTIVITY_PATH"] == nil else { return } let url = NativeAppRuntime.activityFileURL( configURL: URL(fileURLWithPath: "/isolated/parcel.toml"), isolated: false) #expect(url == URL.applicationSupportDirectory.appendingPathComponent("dev.vinnymac.parcel/activity.json")) }
@Test func fixtureStorageStaysBesideItsIsolatedConfig() { guard ProcessInfo.processInfo.environment["PARCEL_ACTIVITY_PATH"] == nil else { return } let url = NativeAppRuntime.activityFileURL( configURL: URL(fileURLWithPath: "/isolated/parcel.toml"), isolated: true) #expect(url.path == "/isolated/activity.json") }
@Test func injectedWorldWithDefaultConfigNeverUsesRealUserStorage() { let url = NativeAppRuntime.activityFileURL(configURL: ConfigStore.defaultFileURL, isolated: true) let scratch = URL(fileURLWithPath: FileManager.default.currentDirectoryPath).appendingPathComponent( ".build/activity-tests/") #expect(url.path.hasPrefix(scratch.path)) #expect(url.lastPathComponent == "activity.json") #expect(!FileManager.default.fileExists(atPath: url.path)) }}