Skip to content
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

server not exposed in tests for projects generated with mongoose template #30

Open
laurentmor opened this issue Sep 18, 2021 · 0 comments

Comments

@laurentmor
Copy link

tools used
NPM 7.5.4
Node 16.9.1
Typescript 4.2.4
fastify-gen 0.3.0
Jest 26.6.3
Issue description
Using the generated code out of the box during test execution, we encounter the following error:
image
I suspect that the following snippet is causing this:
image
Server startup code is as follow:
image

Despite the fastify server object being returned by the exported init() method, it looks like fastify server instance and methods are not exposed to test

** Expected behavior**
Tests should work out of the box just fine

Am I doing something wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant