Closed kubukoz closed 1 month ago
https://oyvindberg.github.io/typo/docs/customization/overview/
You need to configure it to generate mocks and testinsert. There's a bunch of things which can be configured there
sounds a bit counterintuitive that generateMockRepos
isn't enough to generate mocks 😅 the mocks don't require anything from testinserts, do they?
Oh, it should - I missed that you did set it. I'll have a look
doh, I found it! generateFromDb
has two overloads, and the "simple" version - the one you use - throws away the generated source code in test scope. I just added this and overlooked it.
Quick fix: Check the implementation and call the overload with ProjectGraph
instead, and run .foreach(overwriteFolder())
instead in the script.
I'll patch it up soon
This might be a skill issue, but I'm struggling to see any generated test code. For example:
docker run --rm -p 6432:5432 -e POSTGRES_PASSWORD=postgres postgres:16-alpine
all the files that get generated are the main ones. There's nothing for tests, and/or mocks:
Is there something I forgot to configure?