diff --git a/templates/app-esm/test/helper.js b/templates/app-esm/test/helper.js index 3751f95b..85135f28 100644 --- a/templates/app-esm/test/helper.js +++ b/templates/app-esm/test/helper.js @@ -12,7 +12,9 @@ const AppPath = path.join(__dirname, '..', 'app.js') // Fill in this config with all the configurations // needed for testing the application function config () { - return {} + return { + skipOverride: true // Register our application with fastify-plugin + } } // automatically build and tear down our instance diff --git a/templates/app-ts-esm/test/helper.ts b/templates/app-ts-esm/test/helper.ts index 33201e66..d389d14c 100644 --- a/templates/app-ts-esm/test/helper.ts +++ b/templates/app-ts-esm/test/helper.ts @@ -14,8 +14,10 @@ const AppPath = path.join(__dirname, '..', 'src', 'app.ts') // Fill in this config with all the configurations // needed for testing the application -async function config () { - return {} +function config () { + return { + skipOverride: true // Register our application with fastify-plugin + } } // Automatically build and tear down our instance @@ -26,7 +28,7 @@ async function build (t: TestContext) { // fastify-plugin ensures that all decorators // are exposed for testing purposes, this is // different from the production setup - const app = await helper.build(argv, await config()) + const app = await helper.build(argv, config()) // Tear down our app after we are done t.after(() => void app.close()) diff --git a/templates/app-ts/test/helper.ts b/templates/app-ts/test/helper.ts index 2f3dc1aa..88178338 100644 --- a/templates/app-ts/test/helper.ts +++ b/templates/app-ts/test/helper.ts @@ -11,8 +11,10 @@ const AppPath = path.join(__dirname, '..', 'src', 'app.ts') // Fill in this config with all the configurations // needed for testing the application -async function config () { - return {} +function config () { + return { + skipOverride: true // Register our application with fastify-plugin + } } // Automatically build and tear down our instance @@ -23,7 +25,7 @@ async function build (t: TestContext) { // fastify-plugin ensures that all decorators // are exposed for testing purposes, this is // different from the production setup - const app = await helper.build(argv, await config()) + const app = await helper.build(argv, config()) // Tear down our app after we are done t.after(() => void app.close()) diff --git a/templates/app/test/helper.js b/templates/app/test/helper.js index a5237509..c5095f06 100644 --- a/templates/app/test/helper.js +++ b/templates/app/test/helper.js @@ -10,7 +10,9 @@ const AppPath = path.join(__dirname, '..', 'app.js') // Fill in this config with all the configurations // needed for testing the application function config () { - return {} + return { + skipOverride: true // Register our application with fastify-plugin + } } // automatically build and tear down our instance