Skip to content

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

Description

@laurentmor

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions