TypeError in Jest Test: Cannot Use 'in' Operator with Undefined in Effect Schema

Hi all, I am making some unit tests with jest, and I am not coming up with this problem:

 FAIL  src/transactional/email.book.internal.test.ts
  ● Test suite failed to run

    TypeError: Cannot use 'in' operator to search for 'fields' in undefined

      20 |   ),
      21 | }) {}
    > 22 | export class Email extends Schema.Class<Email>('Email')({
         |                                                        ^
      23 |   id: Schema.Number,
      24 |   settings: Settings,
      25 |   template: TemplateEmail,

      at getFields (node_modules/.pnpm/@effect+schema@0.68.27_effect@3.11.4/node_modules/@effect/schema/src/Schema.ts:7156:11)
      at getFields (node_modules/.pnpm/@effect+schema@0.68.27_effect@3.11.4/node_modules/@effect/schema/src/Schema.ts:7156:46)
      at getFields (node_modules/.pnpm/@effect+schema@0.68.27_effect@3.11.4/node_modules/@effect/schema/src/Schema.ts:7159:82)
      at getSchemaFromFieldsOr (node_modules/.pnpm/@effect+schema@0.68.27_effect@3.11.4/node_modules/@effect/schema/src/Schema.ts:7185:13)
      at Object.<anonymous> (src/transactional/email.tsx:22:56)
      at Object.<anonymous> (src/transactional/email.book.internal.ts:12:1)
      at Object.<anonymous> (src/transactional/email.book.internal.test.ts:9:1)
Was this page helpful?