diff --git a/test/languages/application/country/query/find/findCountryQueryHandler.test.ts b/test/languages/application/country/query/find/findCountryQueryHandler.test.ts index c535cf70..d6fed22f 100644 --- a/test/languages/application/country/query/find/findCountryQueryHandler.test.ts +++ b/test/languages/application/country/query/find/findCountryQueryHandler.test.ts @@ -32,7 +32,12 @@ describe('FindCountryQueryHandler', () => { const expected = await findCountryQueryHandler.execute(query); - expect(expected.content).toEqual(country.toPrimitives()); + expect(expected.content).toEqual({ + id: country.id.toString(), + name: country.name, + iso: country.iso, + languages: country.languages.toArray(), + }); }); }); }); diff --git a/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts b/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts index 92ab626c..8b3099bc 100644 --- a/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts +++ b/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts @@ -32,7 +32,20 @@ describe('FindCountryQueryHandler', () => { const expected = await findCountriesQueryHandler.execute(query); - expect(expected.content).toEqual([countryOne.toPrimitives(), countryTwo.toPrimitives()]); + expect(expected.content).toEqual([ + { + id: countryOne.id.toString(), + name: countryOne.name, + iso: countryOne.iso, + languages: countryOne.languages.toArray(), + }, + { + id: countryTwo.id.toString(), + name: countryTwo.name, + iso: countryTwo.iso, + languages: countryTwo.languages.toArray(), + }, + ]); }); }); }); diff --git a/test/languages/application/term/suggestion/findSuggestionsTermQueryHandler.test.ts b/test/languages/application/term/suggestion/findSuggestionsTermQueryHandler.test.ts index 848750eb..ecf86853 100644 --- a/test/languages/application/term/suggestion/findSuggestionsTermQueryHandler.test.ts +++ b/test/languages/application/term/suggestion/findSuggestionsTermQueryHandler.test.ts @@ -29,7 +29,18 @@ describe('FindSuggestionsTermQueryHandler', () => { const foundSuggestionsTerm = await findSuggestionsTermQueryHandler.execute(query); - expect(foundSuggestionsTerm.content).toEqual([term.toPrimitives()]); + expect(foundSuggestionsTerm.content).toEqual([ + { + id: term.id, + title: term.title, + description: term.description, + example: term.example, + type: term.type.value, + hashtags: term.hashtags, + totalLikes: term.totalLikes, + createdAt: term.createdAt.toISOString(), + }, + ]); }); }); });