Ringtone app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
611 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. }