Type Error in Integration Test with UserRepository Service

Hello all, I'm trying to write an integration test with a UserRepository service where UserRepository.Default has type Layer<UserRepository, ConfigError | DatabaseConnectionLostError, never>. I get a type error saying it cannot be assigned to parameter of type Layer<unknown, unknown, never>. I also get a type error when defining the test function on the Effect.fnUntraced line saying Argument of type '() => Effect<void, never, UserRepository>' is not assignable to parameter of type 'TestFunction<unknown, unknown, unknkown, [TestContext]>'. Would anyone have any insights? Here is the code:
describe("UserRepository Integration Tests", () => {
  it.layer(UserRepository.Default, { timeout: "30 seconds" })("UserRepository", (it) => {
    it.effect(
      "should create a user",
      Effect.fnUntraced(function*() {
        const userRepo = yield* UserRepository;
        const newUser = yield* userRepo.create(testAuthUser);

        expect(newUser).toBeDefined();
        expect(newUser.name).toEqual("test-user");
      }),
    );
  );
});

Thanks!
Was this page helpful?