@tmdb-graphql-api/resolvers 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/queries/certifications.test.ts +1 -2
- package/src/queries/collection.test.ts +1 -2
- package/src/queries/collectionImages.test.ts +1 -2
- package/src/queries/collectionTranslations.test.ts +1 -2
- package/src/queries/company.test.ts +1 -2
- package/src/queries/companyAlternativeNames.test.ts +1 -2
- package/src/queries/companyLogos.test.ts +1 -2
- package/src/queries/configuration.test.ts +1 -2
- package/src/queries/configurationCountries.test.ts +1 -2
- package/src/queries/configurationJobs.test.ts +1 -2
- package/src/queries/configurationLanguages.test.ts +1 -2
- package/src/queries/configurationPrimaryTranslations.test.ts +1 -2
- package/src/queries/configurationTimezones.test.ts +1 -2
- package/src/queries/credit.test.ts +1 -2
- package/src/queries/discoverMovies.test.ts +1 -2
- package/src/queries/discoverTv.test.ts +1 -2
- package/src/queries/episode.test.ts +1 -2
- package/src/queries/episodeCredits.test.ts +1 -2
- package/src/queries/episodeExternalIds.test.ts +1 -2
- package/src/queries/episodeStills.test.ts +1 -2
- package/src/queries/episodeTranslations.test.ts +1 -2
- package/src/queries/episodeVideos.test.ts +1 -2
- package/src/queries/find.test.ts +1 -2
- package/src/queries/genres.test.ts +1 -2
- package/src/queries/keyword.test.ts +1 -2
- package/src/queries/movie.test.ts +1 -2
- package/src/queries/movieAlternativeTitles.test.ts +1 -2
- package/src/queries/movieCredits.test.ts +1 -2
- package/src/queries/movieExternalIds.test.ts +1 -2
- package/src/queries/movieImages.test.ts +1 -2
- package/src/queries/movieKeywords.test.ts +1 -2
- package/src/queries/movieRecommendations.test.ts +1 -2
- package/src/queries/movieReleaseDates.test.ts +1 -2
- package/src/queries/movieReviews.test.ts +1 -2
- package/src/queries/movieSimilarMovies.test.ts +1 -2
- package/src/queries/movieTranslations.test.ts +1 -2
- package/src/queries/movieVideos.test.ts +1 -2
- package/src/queries/movieWatchProviders.test.ts +1 -2
- package/src/queries/network.test.ts +1 -2
- package/src/queries/networkAlternativeNames.test.ts +1 -2
- package/src/queries/networkLogos.test.ts +1 -2
- package/src/queries/person.test.ts +1 -2
- package/src/queries/personCombinedCredits.test.ts +1 -2
- package/src/queries/personExternalIds.test.ts +1 -2
- package/src/queries/personMovieCredits.test.ts +1 -2
- package/src/queries/personProfiles.test.ts +1 -2
- package/src/queries/personTranslations.test.ts +1 -2
- package/src/queries/personTvCredits.test.ts +1 -2
- package/src/queries/rated.test.ts +1 -2
- package/src/queries/review.test.ts +1 -2
- package/src/queries/search.test.ts +1 -2
- package/src/queries/season.test.ts +1 -2
- package/src/queries/seasonCredits.test.ts +1 -2
- package/src/queries/seasonExternalIds.test.ts +1 -2
- package/src/queries/seasonPosters.test.ts +1 -2
- package/src/queries/seasonTranslations.test.ts +1 -2
- package/src/queries/seasonVideos.test.ts +1 -2
- package/src/queries/trending.test.ts +1 -2
- package/src/queries/tv.test.ts +1 -2
- package/src/queries/tvAlternativeTitles.test.ts +1 -2
- package/src/queries/tvContentRatings.test.ts +1 -2
- package/src/queries/tvCredits.test.ts +1 -2
- package/src/queries/tvEpisodeGroups.test.ts +1 -2
- package/src/queries/tvExternalIds.test.ts +1 -2
- package/src/queries/tvImages.test.ts +1 -2
- package/src/queries/tvKeywords.test.ts +1 -2
- package/src/queries/tvRecommendations.test.ts +1 -2
- package/src/queries/tvReviews.test.ts +1 -2
- package/src/queries/tvSimilarTvShows.test.ts +1 -2
- package/src/queries/tvTranslations.test.ts +1 -2
- package/src/queries/tvVideos.test.ts +1 -2
- package/src/queries/tvWatchProviders.test.ts +1 -2
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { MOVIE_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import movieDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/details.json';
|
|
5
5
|
import movieSimilarMovies from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/similarMovies.json';
|
|
6
|
-
import { type Jsonifiable, mockFetch
|
|
6
|
+
import { type Jsonifiable, mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { decode } from 'js-base64';
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
resolveMovieSimilarMovies,
|
|
19
19
|
} from './movieSimilarMovies.ts';
|
|
20
20
|
|
|
21
|
-
polyfillFetch();
|
|
22
21
|
const mockedFetch = mockFetch(jest.fn);
|
|
23
22
|
const id = 1891;
|
|
24
23
|
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { MOVIE_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import movieDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/details.json';
|
|
5
5
|
import movieTranslations from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/translations.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawMovieWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveMovieTranslations } from './movieTranslations.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveMovieTranslations >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { MOVIE_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import movieDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/details.json';
|
|
5
5
|
import movieVideos from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/videos.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawMovieWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveMovieVideos } from './movieVideos.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveMovieVideos >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, WATCH_PROVIDER_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import movieDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/details.json';
|
|
5
5
|
import movieWatchProviders from '@tmdb-graphql-api/test-utils/responses/themoviedb/movie/1891/watchProviders.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawMovieWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveMovieWatchProviders } from './movieWatchProviders.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveMovieWatchProviders >', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jest } from '@jest/globals';
|
|
2
2
|
import { NETWORK_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
3
3
|
import networkDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/network/details.json';
|
|
4
|
-
import { mockFetch
|
|
4
|
+
import { mockFetch } from 'fetch-mocked';
|
|
5
5
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
6
6
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
7
7
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -9,7 +9,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
9
9
|
import type { Context } from '../types.ts';
|
|
10
10
|
import { resolveNetwork } from './network.ts';
|
|
11
11
|
|
|
12
|
-
polyfillFetch();
|
|
13
12
|
const mockedFetch = mockFetch(jest.fn);
|
|
14
13
|
|
|
15
14
|
describe('resolveNetwork >', () => {
|
|
@@ -2,7 +2,7 @@ import { jest } from '@jest/globals';
|
|
|
2
2
|
import { NETWORK_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
3
3
|
import networkAlterativeNames from '@tmdb-graphql-api/test-utils/responses/themoviedb/network/alternativeNames.json';
|
|
4
4
|
import networkDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/network/details.json';
|
|
5
|
-
import { mockFetch
|
|
5
|
+
import { mockFetch } from 'fetch-mocked';
|
|
6
6
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
7
7
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
8
8
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -10,7 +10,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
10
10
|
import type { Context, RawNetwork } from '../types.ts';
|
|
11
11
|
import { resolveNetworkAlternativeNames } from './networkAlternativeNames.ts';
|
|
12
12
|
|
|
13
|
-
polyfillFetch();
|
|
14
13
|
const mockedFetch = mockFetch(jest.fn);
|
|
15
14
|
|
|
16
15
|
describe('resolveNetworkAlternativeNames >', () => {
|
|
@@ -2,7 +2,7 @@ import { jest } from '@jest/globals';
|
|
|
2
2
|
import { NETWORK_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
3
3
|
import networkDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/network/details.json';
|
|
4
4
|
import networkLogos from '@tmdb-graphql-api/test-utils/responses/themoviedb/network/images.json';
|
|
5
|
-
import { mockFetch
|
|
5
|
+
import { mockFetch } from 'fetch-mocked';
|
|
6
6
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
7
7
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
8
8
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -10,7 +10,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
10
10
|
import type { Context, RawNetwork } from '../types.ts';
|
|
11
11
|
import { resolveNetworkLogos } from './networkLogos.ts';
|
|
12
12
|
|
|
13
|
-
polyfillFetch();
|
|
14
13
|
const mockedFetch = mockFetch(jest.fn);
|
|
15
14
|
|
|
16
15
|
describe('resolveNetworkLogos >', () => {
|
|
@@ -5,7 +5,7 @@ import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-cl
|
|
|
5
5
|
import { personDetails as personDetailsQuery } from '@tmdb-graphql-api/test-utils/requests/queries/person/details.ts';
|
|
6
6
|
import { personDetailsLg as personDetailsLgQuery } from '@tmdb-graphql-api/test-utils/requests/queries/person/detailsLg.ts';
|
|
7
7
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
8
|
-
import { mockFetch
|
|
8
|
+
import { mockFetch } from 'fetch-mocked';
|
|
9
9
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
10
10
|
import { type GraphQLResolveInfo, OperationTypeNode, parse } from 'graphql';
|
|
11
11
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -14,7 +14,6 @@ import { PERSON } from '../constants.ts';
|
|
|
14
14
|
import type { Context } from '../types.ts';
|
|
15
15
|
import { resolvePerson } from './person.ts';
|
|
16
16
|
|
|
17
|
-
polyfillFetch();
|
|
18
17
|
const mockedFetch = mockFetch(jest.fn);
|
|
19
18
|
|
|
20
19
|
describe('resolvePerson >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personCombinedCredits from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/combinedCredits.json';
|
|
5
5
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawPerson, RawPersonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolvePersonCombinedCredits } from './personCombinedCredits.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonCombinedCredits >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
5
5
|
import personExternalIds from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/externalIds.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawPerson, RawPersonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolvePersonExternalIds } from './personExternalIds.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonExternalIds >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
5
5
|
import personMovieCredits from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/movieCredits.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawPerson, RawPersonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolvePersonMovieCredits } from './personMovieCredits.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonMovieCredits >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
5
5
|
import personProfiles from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/images.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawPerson, RawPersonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolvePersonProfiles } from './personProfiles.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonProfiles >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
5
5
|
import personTranslations from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/translations.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context } from '../types.ts';
|
|
12
12
|
import { resolvePersonTranslations } from './personTranslations.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonTranslations >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { PERSON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import personDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/details.json';
|
|
5
5
|
import personTvCredits from '@tmdb-graphql-api/test-utils/responses/themoviedb/person/3/tvCredits.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawPersonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolvePersonTvCredits } from './personTvCredits.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolvePersonTvCredits >', () => {
|
|
@@ -4,7 +4,7 @@ import { jest } from '@jest/globals';
|
|
|
4
4
|
import { RATED_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
5
5
|
import ratedMovies from '@tmdb-graphql-api/test-utils/responses/themoviedb/rated/movies.json';
|
|
6
6
|
import ratedTv from '@tmdb-graphql-api/test-utils/responses/themoviedb/rated/tv.json';
|
|
7
|
-
import { type Jsonifiable, mockFetch
|
|
7
|
+
import { type Jsonifiable, mockFetch } from 'fetch-mocked';
|
|
8
8
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
9
9
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
10
10
|
import { decode } from 'js-base64';
|
|
@@ -14,7 +14,6 @@ import { RATED } from '../constants.ts';
|
|
|
14
14
|
import type { Context } from '../types.ts';
|
|
15
15
|
import { createMakeCursors, createResourceResolver, cursorCache, resolveRated } from './rated.ts';
|
|
16
16
|
|
|
17
|
-
polyfillFetch();
|
|
18
17
|
const mockedFetch = mockFetch(jest.fn);
|
|
19
18
|
|
|
20
19
|
const baseArgs = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jest } from '@jest/globals';
|
|
2
2
|
import { REVIEW_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
3
3
|
import reviewDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/review/details.json';
|
|
4
|
-
import { mockFetch
|
|
4
|
+
import { mockFetch } from 'fetch-mocked';
|
|
5
5
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
6
6
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
7
7
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -9,7 +9,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
9
9
|
import type { Context } from '../types.ts';
|
|
10
10
|
import { resolveReview } from './review.ts';
|
|
11
11
|
|
|
12
|
-
polyfillFetch();
|
|
13
12
|
const mockedFetch = mockFetch(jest.fn);
|
|
14
13
|
|
|
15
14
|
describe('resolveReview >', () => {
|
|
@@ -10,7 +10,7 @@ import searchMultiPage1 from '@tmdb-graphql-api/test-utils/responses/themoviedb/
|
|
|
10
10
|
import searchMultiPage2 from '@tmdb-graphql-api/test-utils/responses/themoviedb/search/multi/page2.json';
|
|
11
11
|
import searchPeople from '@tmdb-graphql-api/test-utils/responses/themoviedb/search/people.json';
|
|
12
12
|
import searchTV from '@tmdb-graphql-api/test-utils/responses/themoviedb/search/tv.json';
|
|
13
|
-
import { mockFetch
|
|
13
|
+
import { mockFetch } from 'fetch-mocked';
|
|
14
14
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
15
15
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
16
16
|
import { decode } from 'js-base64';
|
|
@@ -20,7 +20,6 @@ import { SEARCH } from '../constants.ts';
|
|
|
20
20
|
import type { Context } from '../types.ts';
|
|
21
21
|
import { createMakeCursors, createResourceResolver, cursorCache, resolveSearch } from './search.ts';
|
|
22
22
|
|
|
23
|
-
polyfillFetch();
|
|
24
23
|
const mockedFetch = mockFetch(jest.fn);
|
|
25
24
|
|
|
26
25
|
describe('createMakeCursors', () => {
|
|
@@ -5,7 +5,7 @@ import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-cl
|
|
|
5
5
|
import { seasonDetails as seasonDetailsQuery } from '@tmdb-graphql-api/test-utils/requests/queries/season/details.ts';
|
|
6
6
|
import { seasonDetailsLg as seasonDetailsLgQuery } from '@tmdb-graphql-api/test-utils/requests/queries/season/detailsLg.ts';
|
|
7
7
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
8
|
-
import { mockFetch
|
|
8
|
+
import { mockFetch } from 'fetch-mocked';
|
|
9
9
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
10
10
|
import { type GraphQLResolveInfo, OperationTypeNode, parse } from 'graphql';
|
|
11
11
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -15,7 +15,6 @@ import { encodeId } from '../helpers/encodeId.ts';
|
|
|
15
15
|
import type { Context } from '../types.ts';
|
|
16
16
|
import { resolveSeason } from './season.ts';
|
|
17
17
|
|
|
18
|
-
polyfillFetch();
|
|
19
18
|
const mockedFetch = mockFetch(jest.fn);
|
|
20
19
|
|
|
21
20
|
describe('resolveSeason >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import seasonCredits from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/credits.json';
|
|
5
5
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawSeason, RawSeasonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveSeasonCredits } from './seasonCredits.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveSeasonCredits >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
5
5
|
import seasonExternalIds from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/externalIds.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawSeason, RawSeasonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveSeasonExternalIds } from './seasonExternalIds.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveSeasonExternalIds >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
5
5
|
import seasonPosters from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/images.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawSeason, RawSeasonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveSeasonPosters } from './seasonPosters.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveSeasonPosters >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
5
5
|
import seasonTranslations from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/translations.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawSeason, RawSeasonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveSeasonTranslations } from './seasonTranslations.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveSeasonTranslations >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { SEASON_PATH, type ShortcutMethodNames } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import seasonDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/details.json';
|
|
5
5
|
import seasonVideos from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/seasons/1/videos.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawSeason, RawSeasonWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveSeasonVideos } from './seasonVideos.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveSeasonVideos >', () => {
|
|
@@ -6,7 +6,7 @@ import type { TrendingMediaType, TrendingTimeWindow } from '@tmdb-graphql-api/sc
|
|
|
6
6
|
import trendingAllDay from '@tmdb-graphql-api/test-utils/responses/themoviedb/trending/allDay.json';
|
|
7
7
|
import trendingMovieDay from '@tmdb-graphql-api/test-utils/responses/themoviedb/trending/movieDay.json';
|
|
8
8
|
import trendingMovieWeek from '@tmdb-graphql-api/test-utils/responses/themoviedb/trending/movieWeek.json';
|
|
9
|
-
import { type Jsonifiable, mockFetch
|
|
9
|
+
import { type Jsonifiable, mockFetch } from 'fetch-mocked';
|
|
10
10
|
import type { Getta, ShortcutProperties } from 'getta';
|
|
11
11
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
12
12
|
import { decode } from 'js-base64';
|
|
@@ -16,7 +16,6 @@ import { TRENDING } from '../constants.ts';
|
|
|
16
16
|
import type { Context } from '../types.ts';
|
|
17
17
|
import { createMakeCursors, createResourceResolver, cursorCache, resolveTrending } from './trending.ts';
|
|
18
18
|
|
|
19
|
-
polyfillFetch();
|
|
20
19
|
const mockedFetch = mockFetch(jest.fn);
|
|
21
20
|
|
|
22
21
|
const baseArgs = {
|
package/src/queries/tv.test.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client
|
|
|
5
5
|
import { tvDetails as tvDetailsQuery } from '@tmdb-graphql-api/test-utils/requests/queries/tv/details.ts';
|
|
6
6
|
import { tvDetailsLg as tvDetailsLgQuery } from '@tmdb-graphql-api/test-utils/requests/queries/tv/detailsLg.ts';
|
|
7
7
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
8
|
-
import { mockFetch
|
|
8
|
+
import { mockFetch } from 'fetch-mocked';
|
|
9
9
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
10
10
|
import { type GraphQLResolveInfo, OperationTypeNode, parse } from 'graphql';
|
|
11
11
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -14,7 +14,6 @@ import { TV } from '../constants.ts';
|
|
|
14
14
|
import type { Context } from '../types.ts';
|
|
15
15
|
import { resolveTv } from './tv.ts';
|
|
16
16
|
|
|
17
|
-
polyfillFetch();
|
|
18
17
|
const mockedFetch = mockFetch(jest.fn);
|
|
19
18
|
|
|
20
19
|
describe('resolveTv >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvAlternativeTitles from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/alternativeTitles.json';
|
|
5
5
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvAlternativeTitles } from './tvAlternativeTitles.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvAlternativeTitles >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvContentRatings from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/contentRatings.json';
|
|
5
5
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvContentRatings } from './tvContentRatings.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvContentRatings >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvCredits from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/credits.json';
|
|
5
5
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvCredits } from './tvCredits.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvCredits >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvEpisodeGroups from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/episodeGroups.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvEpisodeGroups } from './tvEpisodeGroups.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvEpisodeGroups >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvExternalIds from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/externalIds.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvExternalIds } from './tvExternalIds.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvExternalIds >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvImages from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/images.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvImages } from './tvImages.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvImages >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvKeywords from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/keywords.json';
|
|
6
|
-
import { mockFetch
|
|
6
|
+
import { mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { buildEndpoint } from '../__testUtils__/helpers/buildEndpoint.ts';
|
|
@@ -11,7 +11,6 @@ import { createRestClient } from '../__testUtils__/helpers/createRestClient.ts';
|
|
|
11
11
|
import type { Context, RawTvWithAppendToResponse } from '../types.ts';
|
|
12
12
|
import { resolveTvKeywords } from './tvKeywords.ts';
|
|
13
13
|
|
|
14
|
-
polyfillFetch();
|
|
15
14
|
const mockedFetch = mockFetch(jest.fn);
|
|
16
15
|
|
|
17
16
|
describe('resolveTvKeywords >', () => {
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvRecommendations from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/recommendations.json';
|
|
6
|
-
import { type Jsonifiable, mockFetch
|
|
6
|
+
import { type Jsonifiable, mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { decode } from 'js-base64';
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
resolveTvRecommendations,
|
|
19
19
|
} from './tvRecommendations.ts';
|
|
20
20
|
|
|
21
|
-
polyfillFetch();
|
|
22
21
|
const mockedFetch = mockFetch(jest.fn);
|
|
23
22
|
const id = 1399;
|
|
24
23
|
|
|
@@ -3,7 +3,7 @@ import { jest } from '@jest/globals';
|
|
|
3
3
|
import { type ShortcutMethodNames, TV_PATH } from '@tmdb-graphql-api/rest-client';
|
|
4
4
|
import tvDetails from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/details.json';
|
|
5
5
|
import tvReviews from '@tmdb-graphql-api/test-utils/responses/themoviedb/tv/1399/reviews.json';
|
|
6
|
-
import { type Jsonifiable, mockFetch
|
|
6
|
+
import { type Jsonifiable, mockFetch } from 'fetch-mocked';
|
|
7
7
|
import type { FetchResponse, Getta, ShortcutProperties } from 'getta';
|
|
8
8
|
import type { GraphQLResolveInfo } from 'graphql';
|
|
9
9
|
import { decode } from 'js-base64';
|
|
@@ -13,7 +13,6 @@ import { REVIEWS, TV } from '../constants.ts';
|
|
|
13
13
|
import type { Context, RawTv, RawTvWithAppendToResponse } from '../types.ts';
|
|
14
14
|
import { createMakeCursors, createResourceResolver, cursorCache, resolveTvReviews } from './tvReviews.ts';
|
|
15
15
|
|
|
16
|
-
polyfillFetch();
|
|
17
16
|
const mockedFetch = mockFetch(jest.fn);
|
|
18
17
|
const id = 1399;
|
|
19
18
|
|