Ringtone app
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

22 linhas
610 B

  1. // This file contains code that we reuse between our tests.
  2. import Fastify from 'fastify'
  3. import fp from 'fastify-plugin'
  4. import App from '../src/app'
  5. // Fill in this config with all the configurations
  6. // needed for testing the application
  7. export const config = async () => {
  8. return {};
  9. }
  10. // Automatically build and tear down our instance
  11. export const build = async () => {
  12. const app = Fastify()
  13. // fastify-plugin ensures that all decorators
  14. // are exposed for testing purposes, this is
  15. // different from the production setup
  16. void app.register(fp(App), await config())
  17. await app.ready()
  18. return app
  19. }