chore: generate
This commit is contained in:
@@ -150,7 +150,9 @@ function ready(directory: string) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describeWatcher("FileWatcher", () => {
|
||||
it.instance("publishes root create, update, and delete events", () =>
|
||||
it.instance(
|
||||
"publishes root create, update, and delete events",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
const fs = yield* AppFileSystem.Service
|
||||
@@ -181,16 +183,16 @@ describeWatcher("FileWatcher", () => {
|
||||
|
||||
yield* withWatcher(
|
||||
test.directory,
|
||||
nextUpdate(
|
||||
test.directory,
|
||||
(e) => e.file === file && e.event === "add",
|
||||
fs.writeFileString(file, "plain"),
|
||||
).pipe(Effect.tap((evt) => Effect.sync(() => expect(evt).toEqual({ file, event: "add" })))),
|
||||
nextUpdate(test.directory, (e) => e.file === file && e.event === "add", fs.writeFileString(file, "plain")).pipe(
|
||||
Effect.tap((evt) => Effect.sync(() => expect(evt).toEqual({ file, event: "add" }))),
|
||||
),
|
||||
)
|
||||
}),
|
||||
)
|
||||
|
||||
it.instance("cleanup stops publishing events", () =>
|
||||
it.instance(
|
||||
"cleanup stops publishing events",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
const fs = yield* AppFileSystem.Service
|
||||
@@ -207,7 +209,9 @@ describeWatcher("FileWatcher", () => {
|
||||
{ git: true },
|
||||
)
|
||||
|
||||
it.instance("ignores .git/index changes", () =>
|
||||
it.instance(
|
||||
"ignores .git/index changes",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
const fs = yield* AppFileSystem.Service
|
||||
@@ -227,7 +231,9 @@ describeWatcher("FileWatcher", () => {
|
||||
{ git: true },
|
||||
)
|
||||
|
||||
it.instance("publishes .git/HEAD events", () =>
|
||||
it.instance(
|
||||
"publishes .git/HEAD events",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
const fs = yield* AppFileSystem.Service
|
||||
|
||||
@@ -167,7 +167,11 @@ const trackBrowserOpenFailed = Effect.gen(function* () {
|
||||
const authenticateScoped = (name: string) =>
|
||||
Effect.gen(function* () {
|
||||
const mcp = yield* service
|
||||
yield* mcp.authenticate(name).pipe(Effect.ignore, Effect.catchCause(() => Effect.void), Effect.forkScoped)
|
||||
yield* mcp.authenticate(name).pipe(
|
||||
Effect.ignore,
|
||||
Effect.catchCause(() => Effect.void),
|
||||
Effect.forkScoped,
|
||||
)
|
||||
})
|
||||
|
||||
mcpTest.instance(
|
||||
@@ -180,10 +184,7 @@ mcpTest.instance(
|
||||
const event = yield* trackBrowserOpenFailed
|
||||
yield* authenticateScoped("test-oauth-server")
|
||||
|
||||
const failure = yield* awaitWithTimeout(
|
||||
Deferred.await(event),
|
||||
"Timed out waiting for BrowserOpenFailed event",
|
||||
)
|
||||
const failure = yield* awaitWithTimeout(Deferred.await(event), "Timed out waiting for BrowserOpenFailed event")
|
||||
|
||||
expect(failure.mcpName).toBe("test-oauth-server")
|
||||
expect(failure.url).toContain("https://")
|
||||
|
||||
Reference in New Issue
Block a user