Quramy / prisma-fabbrica

Prisma generator to define model factory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NODE_ENV="development" stops generating codes if typescript's tests not passed, and Node TypeLiteral did not pass test 'isEntityName' always fails

tkow opened this issue · comments

Describe the bug

If specifying NODE_ENV="development" and run prisma-fabbrica generators then type tests aren't passed, it stops generating code though it continues with other values.

Now, maybe due to Node TypeLiteral did not pass test 'isEntityName' warning, anytime it stops now when setting NODE_ENV="development" .

スクリーンショット 2022-11-30 10 07 49

To Reproduce
Set env variables NODE_ENV="development" and run npm run migrate:test:ci in example-prj directory.

Expected behavior

There are two choices.

  1. If not allowing warning, fix Node TypeLiteral did not pass test 'isEntityName'
  2. If allowing warning, skip this exception and continue to generate codes.

Your Schema

Maybe any schema I tested if warning occurs.

Environment (please complete the following information):

  • Database kind [any]
  • Node.js version [any?]
  • @prisma/client version [4.6.1]
  • TypeScript version [4.9.3]

Additional context

Thanks for your reporting!

I've never heard the warning, but I want to choice this option.

  1. If not allowing warning, fix Node TypeLiteral did not pass test 'isEntityName'

I'll investigate and attempt to fix this.

I fixed this via #63 and published as v0.2.4 .