MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / createUser2

Function createUser2

test/README.example.spec.ts:287–294  ·  view source on GitHub ↗
(user: Omit<User, "id">)

Source from the content-addressed store, hash-verified

285 };
286
287 const createUser2 = (user: Omit<User, "id">) =>
288 effected(function* () {
289 yield* requiresAdmin();
290 const id = yield* effectify(db.user.create(user));
291 const savedUser = { id, ...user };
292 yield* println("User created:", savedUser);
293 return savedUser;
294 });
295
296 logSpy = vi.spyOn(console, "log").mockImplementation(() => {});
297 expect(

Callers 1

Calls 3

effectedFunction · 0.90
effectifyFunction · 0.90
requiresAdminFunction · 0.70

Tested by

no test coverage detected