diff --git a/test/app.e2e-spec.ts b/test/app.e2e-spec.ts index 3bafeb4..aeffa9a 100644 --- a/test/app.e2e-spec.ts +++ b/test/app.e2e-spec.ts @@ -15,10 +15,14 @@ describe('AppController (e2e)', () => { await app.init(); }); - it('/ (GET)', () => { + it('/api/movies/tt0061852 (GET)', () => { return request(app.getHttpServer()) - .get('/') + .get('/api/movies/tt0061852') .expect(200) - .expect('Hello World!'); + .expect((response) => { + expect(response.body).toMatchObject({ + title: 'The Jungle Book', + }); + }); }); }); diff --git a/test/jest-e2e.json b/test/jest-e2e.json index e9d912f..72f1377 100644 --- a/test/jest-e2e.json +++ b/test/jest-e2e.json @@ -2,7 +2,7 @@ "moduleFileExtensions": ["js", "json", "ts"], "rootDir": ".", "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", + "testRegex": "\\.e2e-spec\\.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" } diff --git a/src/integration/movies/omdb/apiClient.spec.ts b/test/omdbApiClient.e2e-spec.ts similarity index 95% rename from src/integration/movies/omdb/apiClient.spec.ts rename to test/omdbApiClient.e2e-spec.ts index aa01e26..b634d95 100644 --- a/src/integration/movies/omdb/apiClient.spec.ts +++ b/test/omdbApiClient.e2e-spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from '@jest/globals'; -import { createOmdbApiClient } from './apiClient'; +import { createOmdbApiClient } from '../src/integration/movies/omdb/apiClient'; describe('createOmdbApiClient', () => { const client = createOmdbApiClient('68fd98ab'); diff --git a/src/integration/movies/omdb/index.spec.ts b/test/omdbProvider.e2e-spec.ts similarity index 94% rename from src/integration/movies/omdb/index.spec.ts rename to test/omdbProvider.e2e-spec.ts index 1eb4325..84da44b 100644 --- a/src/integration/movies/omdb/index.spec.ts +++ b/test/omdbProvider.e2e-spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from '@jest/globals'; -import { createOmdbProviderByApiKey } from './index'; +import { createOmdbProviderByApiKey } from '../src/integration/movies/omdb'; describe('createOmdbProvider', () => { const client = createOmdbProviderByApiKey('68fd98ab');