Skip to content
Myr

Type the listing test's description read and the Project DO test's slow admission so the root typecheck's Effect diagnostics pass

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The landedOf callback now says it returns Effect<LandedProject, string>, and the Deferreds carry a string where undefined was a void in the type. The slow Workflow admission runs its Effect with the test's own context.

authored by oscabriel · committed by oscabriel · parent 9a3d263 · Browse files · 2 files+14 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+14 added−10 removed

  • tests:+14 added−10 removed

2 files+14 added−10 removed

modified:apps/platform/test/project-do.test.ts+5 added-4 removed
131 unmodified lines
132 () =>133 Effect.gen(function* () {134 yield* advanceTo(noon);135136 const admitted = yield* Deferred.make<undefined>();136 const admitted = yield* Deferred.make<string>();137 const context = yield* Effect.context();138 const { instances, workflow } = answerWorkflow();139 const pending: Promise<unknown>[] = [];140141 // Admission takes as long as the test says, as a Workflow's does.142 const slow: AnswerWorkflow = {143 ...workflow,144 create: (input) =>144 Effect.runPromise(145 Effect.andThen(Deferred.await(admitted), () =>145 Effect.runPromiseWith(context)(146 Effect.flatMap(Deferred.await(admitted), () =>147 Effect.promise(() => workflow.create(input))148 )149 ),150 };
37 unmodified lines
188 yield* shell.alarm();189190 const alarmed = yield* instances.tries;191191 yield* Deferred.succeed(admitted);192 yield* Deferred.succeed(admitted, "admitted");193 yield* Effect.promise(() => Promise.all(pending));194195 const made = yield* instances.made;196
162 unmodified lines
modified:packages/project/test/listing.test.ts+9 added-6 removed