-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: item_update_logs implementation #161
Conversation
…tension in shelter-supply-service
0070159
to
e8bacba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estou com erro ao rodar os testes:
> dotenv -e .env.test -- jest --config ./test/jest.e2e.config.ts
FAIL test/app.e2e-spec.ts
● Test suite failed to run
test/app.e2e-spec.ts:80:30 - error TS2339: Property 'suppliesHistory' does not exist on type 'PrismaService'.
80 const log = await prisma.suppliesHistory.findFirst({
~~~~~~~~~~~~~~~
test/app.e2e-spec.ts:108:33 - error TS2339: Property 'suppliesHistory' does not exist on type 'PrismaService'.
108 const before = await prisma.suppliesHistory.count();
~~~~~~~~~~~~~~~
test/app.e2e-spec.ts:119:32 - error TS2339: Property 'suppliesHistory' does not exist on type 'PrismaService'.
119 const after = await prisma.suppliesHistory.count();
~~~~~~~~~~~~~~~
test/app.e2e-spec.ts:120:42 - error TS2339: Property 'suppliesHistory' does not exist on type 'PrismaService'.
120 const suppliesHistory = await prisma.suppliesHistory.findMany({
~~~~~~~~~~~~~~~
test/app.e2e-spec.ts:211:12 - error TS2339: Property 'suppliesHistory' does not exist on type 'PrismaService'.
211 prisma.suppliesHistory.deleteMany(),
~~~~~~~~~~~~~~~
Test Suites: 1 failed, 1 total
Boa. Creio que faltou colocar o "prisma migrade deploy" antes de executar o teste. (achava que rodava antes na pipeline, por isso não mencionei) |
Na verdade meu eu do passado tinha me ajudado, colocando o "pre" hook do npm. Ocorre mesmo usando o "npm run test:e2e" ? |
Para formalizar o fechamento do PR, vou colar aqui a resposta oficial do @rhuam que foi dada ao author no grupo do discord: "optamos por uma solução com menos complexidade de código, onde a regra de negócio ficasse no banco de dados de forma nativa, sem usar JSON para armazenar dados. Sua solução estava ótima, mas acreditamos que a #162 performa melhor e é mais fácil para dar manutenção." |
Histórico de Modificações dos Itens do Abrigo
#146
Implementação inicial que fecha a #146
Além disso também deixei esquematizado um audit genérico caso achem válido. Caso contrário removo do PR dps de fechar o draft