summaryrefslogtreecommitdiffhomepage
path: root/packages/core/test
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/test')
-rw-r--r--packages/core/test/fixture/effect-flock-worker.ts25
-rw-r--r--packages/core/test/util/effect-flock.test.ts21
2 files changed, 20 insertions, 26 deletions
diff --git a/packages/core/test/fixture/effect-flock-worker.ts b/packages/core/test/fixture/effect-flock-worker.ts
index 3dc3ee2c8..c442a62cf 100644
--- a/packages/core/test/fixture/effect-flock-worker.ts
+++ b/packages/core/test/fixture/effect-flock-worker.ts
@@ -18,20 +18,17 @@ function sleep(ms: number) {
return new Promise<void>((resolve) => setTimeout(resolve, ms))
}
-const msg: Msg = JSON.parse(process.argv[2]!)
-
-const testGlobal = Layer.succeed(
- Global.Service,
- Global.Service.of({
- home: os.homedir(),
- data: os.tmpdir(),
- cache: os.tmpdir(),
- config: os.tmpdir(),
- state: os.tmpdir(),
- bin: os.tmpdir(),
- log: os.tmpdir(),
- }),
-)
+const msg: Msg = JSON.parse(process.argv[2])
+
+const testGlobal = Global.layerWith({
+ home: os.homedir(),
+ data: os.tmpdir(),
+ cache: os.tmpdir(),
+ config: os.tmpdir(),
+ state: os.tmpdir(),
+ bin: os.tmpdir(),
+ log: os.tmpdir(),
+})
const testLayer = EffectFlock.layer.pipe(Layer.provide(testGlobal), Layer.provide(AppFileSystem.defaultLayer))
diff --git a/packages/core/test/util/effect-flock.test.ts b/packages/core/test/util/effect-flock.test.ts
index 9e8bc24ac..76cee4f8e 100644
--- a/packages/core/test/util/effect-flock.test.ts
+++ b/packages/core/test/util/effect-flock.test.ts
@@ -93,18 +93,15 @@ async function waitForFile(file: string, timeout = 3_000) {
// Test layer
// ---------------------------------------------------------------------------
-const testGlobal = Layer.succeed(
- Global.Service,
- Global.Service.of({
- home: os.homedir(),
- data: os.tmpdir(),
- cache: os.tmpdir(),
- config: os.tmpdir(),
- state: os.tmpdir(),
- bin: os.tmpdir(),
- log: os.tmpdir(),
- }),
-)
+const testGlobal = Global.layerWith({
+ home: os.homedir(),
+ data: os.tmpdir(),
+ cache: os.tmpdir(),
+ config: os.tmpdir(),
+ state: os.tmpdir(),
+ bin: os.tmpdir(),
+ log: os.tmpdir(),
+})
const testLayer = EffectFlock.layer.pipe(Layer.provide(testGlobal), Layer.provide(AppFileSystem.defaultLayer))