You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the regression has not already been reported
Last working version
4.x
Stopped working in version
5.7.1
Node.js version
v18.16.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 22.04.2 LTS
💥 Regression Report
Generated app, in the test build function, I believe const app = await helper.build(argv, await config()) doesn't load/autoload plugins, Am I missing something?
The issue is about the following line
In my case, I needed this in the test setup to use the ORM fastify plugin I'm using to generate db schema and remove in teardown.
Steps to Reproduce
Generate a new app with fastify-cli
Try to access a plugin function inside the build function itself eg: app.someSupport()
asyncfunctionbuild(t: Test){// you can set all the options supported by the fastify CLI commandconstargv=[AppPath]// fastify-plugin ensures that all decorators// are exposed for testing purposes, this is// different from the production setupconstapp=awaithelper.build(argv,awaitconfig())app.someSupport()// Tear down our app after we are donet.teardown(()=>voidapp.close())returnapp}
An error should be thrown
Expected Behavior
The plugin function results should be returned.
The text was updated successfully, but these errors were encountered:
Prerequisites
Last working version
4.x
Stopped working in version
5.7.1
Node.js version
v18.16.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 22.04.2 LTS
💥 Regression Report
Generated app, in the test build function, I believe
const app = await helper.build(argv, await config())
doesn't load/autoload plugins, Am I missing something?The issue is about the following line
fastify-cli/templates/app-ts/test/helper.ts
Line 24 in f111b25
app.register app.ready work perfectly before.
In my case, I needed this in the test setup to use the ORM fastify plugin I'm using to generate db schema and remove in teardown.
Steps to Reproduce
app.someSupport()
Expected Behavior
The plugin function results should be returned.
The text was updated successfully, but these errors were encountered: