MCPcopy Create free account
hub / github.com/Effect-TS/effect / isolate

Function isolate

packages/sql/sqlite-node/test/SqlEventJournal.test.ts:52–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50// Fresh module instances keep their own entry id clock. They load before any
51// test runs, so loading them cannot stall running tests.
52const isolate = () => {
53 vi.resetModules()
54 return Promise.all([
55 import("effect/Effect"),
56 import("effect/eventlog/EventJournal"),
57 import("effect/eventlog/SqlEventJournal"),
58 import("effect/sql/SqlClient"),
59 import("@effect/sql-sqlite-node/SqliteClient"),
60 import("effect/reactivity/Reactivity")
61 ]).then(([Effect, EventJournal, SqlEventJournal, SqlClient, SqliteClient, Reactivity]) => ({
62 Effect,
63 EventJournal,
64 SqlEventJournal,
65 SqlClient,
66 SqliteClient,
67 Reactivity
68 }))
69}
70// Stands in for another process.
71const OtherProcess = await isolate()
72// Importing the maximum timestamp can exhaust the entry id clock of its module.

Callers 1

Calls 1

allMethod · 0.65

Tested by

no test coverage detected