Get transcript summaries of Web videos.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

29 lignes
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. });