Get transcript summaries of Web videos.
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.

29 lines
710 B

  1. import { describe, it, expect, beforeAll, afterAll } from 'vitest';
  2. import { createServer } from '../src/server';
  3. import { addHealthRoutes, addSummaryRoutes } from '../src/routes';
  4. import { FastifyInstance } from 'fastify';
  5. describe('Example', () => {
  6. let server: FastifyInstance;
  7. beforeAll(() => {
  8. server = createServer();
  9. addHealthRoutes(server);
  10. addSummaryRoutes(server);
  11. });
  12. afterAll(async () => {
  13. await server.close();
  14. });
  15. it('should have the expected content', async () => {
  16. const response = await server
  17. .inject()
  18. .get('/api/health/live')
  19. .headers({
  20. Accept: 'application/json',
  21. });
  22. expect(response.statusCode).toBe(200);
  23. });
  24. });