diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index c910f676..11d3270c 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -23,4 +23,4 @@ jobs: - name: Run format code check run: npm run format-code-check - name: Run unit tests - run: npm run test + run: npm run test:unit diff --git a/package.json b/package.json index 7134c632..495f793e 100755 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "linter-check": "eslint 'src/**/*.ts'", "linter-fix": "eslint --fix 'src/**/*.ts'", "typeorm": "ts-node --require tsconfig-paths/register -r dotenv/config -r ts-node/register/transpile-only ./node_modules/typeorm/cli.js -d src/shared/infrastructure/persistence/typeOrm/dataSource.ts ", - "test": "jest", + "test:unit": "jest --testPathPattern=test/unit", "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", diff --git a/test/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts b/test/unit/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts similarity index 76% rename from test/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts rename to test/unit/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts index 81fad101..a563ae35 100644 --- a/test/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts +++ b/test/unit/languages/application/auth/command/loginUser/loginUserCommandHandler.test.ts @@ -2,13 +2,13 @@ import { beforeEach, describe, expect, it, jest } from '@jest/globals'; import LoginUserCommandHandler from '@src/languages/application/auth/command/loginUser/loginUserCommandHandler'; import { LoginUserCommandMother } from './loginUserCommandMother'; import LoginException from '@src/languages/domain/user/loginException'; -import { EventBusMock } from '@test/shared/domain/buses/eventBus/eventBusMock'; -import { AuthSessionCreatedEventMother } from '@test/languages/domain/auth/authSessionCreatedEventMother'; -import { AuthSessionRepositoryMock } from '@test/languages/domain/auth/authSessionRepositoryMock'; -import { AuthSessionMother } from '@test/languages/domain/auth/authSessionMother'; -import { AuthSessionIdMother } from '@test/languages/domain/auth/authSessionIdMother'; -import { SessionMother } from '@test/languages/domain/auth/sessionMother'; -import { SocialAuthenticatorMock } from '@test/languages/domain/auth/socialAuthenticatorMock'; +import { AuthSessionRepositoryMock } from '@test/unit/languages/domain/auth/authSessionRepositoryMock'; +import { SocialAuthenticatorMock } from '@test/unit/languages/domain/auth/socialAuthenticatorMock'; +import { EventBusMock } from '@test/unit/shared/domain/buses/eventBus/eventBusMock'; +import { AuthSessionMother } from '@test/unit/languages/domain/auth/authSessionMother'; +import { AuthSessionIdMother } from '@test/unit/languages/domain/auth/authSessionIdMother'; +import { SessionMother } from '@test/unit/languages/domain/auth/sessionMother'; +import { AuthSessionCreatedEventMother } from '@test/unit/languages/domain/auth/authSessionCreatedEventMother'; describe('LoginUserCommandHandler', () => { let repository: AuthSessionRepositoryMock; diff --git a/test/languages/application/auth/command/loginUser/loginUserCommandMother.ts b/test/unit/languages/application/auth/command/loginUser/loginUserCommandMother.ts similarity index 100% rename from test/languages/application/auth/command/loginUser/loginUserCommandMother.ts rename to test/unit/languages/application/auth/command/loginUser/loginUserCommandMother.ts diff --git a/test/languages/application/country/command/create/createCountryCommandHandler.test.ts b/test/unit/languages/application/country/command/create/createCountryCommandHandler.test.ts similarity index 77% rename from test/languages/application/country/command/create/createCountryCommandHandler.test.ts rename to test/unit/languages/application/country/command/create/createCountryCommandHandler.test.ts index ee65bb90..ff625b11 100644 --- a/test/languages/application/country/command/create/createCountryCommandHandler.test.ts +++ b/test/unit/languages/application/country/command/create/createCountryCommandHandler.test.ts @@ -1,12 +1,12 @@ import { beforeEach, describe, expect, it } from '@jest/globals'; import CreateCountryCommandHandler from '@src/languages/application/country/command/create/createCountryCommandHandler'; import Country from '@src/languages/domain/country/country'; -import { CountryRepositoryMock } from '@test/languages/domain/country/countryRepositoryMock'; -import CountryMother from '@test/languages/domain/country/countryMother'; -import { CreateCountryCommandMother } from './createCountryCommandMother'; +import { CountryRepositoryMock } from '@test/unit/languages/domain/country/countryRepositoryMock'; +import { EventBusMock } from '@test/unit/shared/domain/buses/eventBus/eventBusMock'; +import CountryMother from '@test/unit/languages/domain/country/countryMother'; +import { CreateCountryCommandMother } from '@test/unit/languages/application/country/command/create/createCountryCommandMother'; import CountryAlreadyExistsException from '@src/languages/domain/country/countryAlreadyExistsException'; -import { EventBusMock } from '@test/shared/domain/buses/eventBus/eventBusMock'; -import { CountryCreatedEventMother } from '@test/languages/domain/country/countryCreatedEventMother'; +import { CountryCreatedEventMother } from '@test/unit/languages/domain/country/countryCreatedEventMother'; describe('CreateCountryCommandHandler', () => { let eventBus: EventBusMock; diff --git a/test/languages/application/country/command/create/createCountryCommandMother.ts b/test/unit/languages/application/country/command/create/createCountryCommandMother.ts similarity index 100% rename from test/languages/application/country/command/create/createCountryCommandMother.ts rename to test/unit/languages/application/country/command/create/createCountryCommandMother.ts diff --git a/test/languages/application/country/query/find/findCountryQueryHandler.test.ts b/test/unit/languages/application/country/query/find/findCountryQueryHandler.test.ts similarity index 84% rename from test/languages/application/country/query/find/findCountryQueryHandler.test.ts rename to test/unit/languages/application/country/query/find/findCountryQueryHandler.test.ts index 46b66a79..3d90d9e6 100644 --- a/test/languages/application/country/query/find/findCountryQueryHandler.test.ts +++ b/test/unit/languages/application/country/query/find/findCountryQueryHandler.test.ts @@ -1,10 +1,10 @@ import { beforeEach, describe, expect, it } from '@jest/globals'; import { FindCountryQueryMother } from './findCountryQueryMother'; import FindCountryQueryHandler from '@src/languages/application/country/query/find/findCountryQueryHandler'; -import { CountryRepositoryMock } from '@test/languages/domain/country/countryRepositoryMock'; -import CountryMother from '@test/languages/domain/country/countryMother'; +import { CountryRepositoryMock } from '@test/unit/languages/domain/country/countryRepositoryMock'; +import { CountryIdMother } from '@test/unit/languages/domain/country/countryIdMother'; import Country from '@src/languages/domain/country/country'; -import { CountryIdMother } from '@test/languages/domain/country/countryIdMother'; +import CountryMother from '@test/unit/languages/domain/country/countryMother'; describe('FindCountryQueryHandler', () => { let countryRepository: CountryRepositoryMock; diff --git a/test/languages/application/country/query/find/findCountryQueryMother.ts b/test/unit/languages/application/country/query/find/findCountryQueryMother.ts similarity index 100% rename from test/languages/application/country/query/find/findCountryQueryMother.ts rename to test/unit/languages/application/country/query/find/findCountryQueryMother.ts diff --git a/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts b/test/unit/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts similarity index 90% rename from test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts rename to test/unit/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts index 8b3099bc..41e4e12d 100644 --- a/test/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts +++ b/test/unit/languages/application/country/query/findAll/findCountriesQueryHandler.test.ts @@ -1,9 +1,9 @@ import { beforeEach, describe, expect, it } from '@jest/globals'; -import { CountryRepositoryMock } from '@test/languages/domain/country/countryRepositoryMock'; -import CountryMother from '@test/languages/domain/country/countryMother'; import Country from '@src/languages/domain/country/country'; import { FindCountriesQueryMother } from './findCountriesQueryMother'; import FindCountriesQueryHandler from '@src/languages/application/country/query/findAll/findCountriesQueryHandler'; +import { CountryRepositoryMock } from '@test/unit/languages/domain/country/countryRepositoryMock'; +import CountryMother from '@test/unit/languages/domain/country/countryMother'; describe('FindCountryQueryHandler', () => { let countryRepository: CountryRepositoryMock; diff --git a/test/languages/application/country/query/findAll/findCountriesQueryMother.ts b/test/unit/languages/application/country/query/findAll/findCountriesQueryMother.ts similarity index 100% rename from test/languages/application/country/query/findAll/findCountriesQueryMother.ts rename to test/unit/languages/application/country/query/findAll/findCountriesQueryMother.ts diff --git a/test/languages/application/term/command/create/createExpressionCommandHandler.test.ts b/test/unit/languages/application/term/command/create/createExpressionCommandHandler.test.ts similarity index 75% rename from test/languages/application/term/command/create/createExpressionCommandHandler.test.ts rename to test/unit/languages/application/term/command/create/createExpressionCommandHandler.test.ts index 2b134fd9..19b27196 100644 --- a/test/languages/application/term/command/create/createExpressionCommandHandler.test.ts +++ b/test/unit/languages/application/term/command/create/createExpressionCommandHandler.test.ts @@ -1,13 +1,13 @@ import { beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { EventBusMock } from '@test/shared/domain/buses/eventBus/eventBusMock'; -import { UserIdMother } from '@test/languages/domain/user/userIdMother'; +import { EventBusMock } from '@test/unit/shared/domain/buses/eventBus/eventBusMock'; +import { TermRepositoryMock } from '@test/unit/languages/domain/term/termRepositoryMock'; import CreateExpressionCommandHandler from '@src/languages/application/term/command/create/createExpressionCommandHandler'; -import { CreateExpressionCommandMother } from './createExpressionCommandMother'; -import ExpressionMother from '@test/languages/domain/term/expression/expressionMother'; -import Expression from '@src/languages/domain/term/expression/expression'; -import { ExpressionCreatedEventMother } from '@test/languages/domain/term/expression/expressionCreatedEventMother'; +import ExpressionMother from '@test/unit/languages/domain/term/expression/expressionMother'; +import { CreateExpressionCommandMother } from '@test/unit/languages/application/term/command/create/createExpressionCommandMother'; import ExpressionAlreadyExistsException from '@src/languages/domain/term/expression/expressionAlreadyExistsException'; -import { TermRepositoryMock } from '@test/languages/domain/term/termRepositoryMock'; +import { UserIdMother } from '@test/unit/languages/domain/user/userIdMother'; +import Expression from '@src/languages/domain/term/expression/expression'; +import { ExpressionCreatedEventMother } from '@test/unit/languages/domain/term/expression/expressionCreatedEventMother'; describe('CreateExpressionCommandHandler', () => { let eventBus: EventBusMock; diff --git a/test/languages/application/term/command/create/createExpressionCommandMother.ts b/test/unit/languages/application/term/command/create/createExpressionCommandMother.ts similarity index 100% rename from test/languages/application/term/command/create/createExpressionCommandMother.ts rename to test/unit/languages/application/term/command/create/createExpressionCommandMother.ts diff --git a/test/languages/application/term/command/create/createWordCommandHandler.test.ts b/test/unit/languages/application/term/command/create/createWordCommandHandler.test.ts similarity index 75% rename from test/languages/application/term/command/create/createWordCommandHandler.test.ts rename to test/unit/languages/application/term/command/create/createWordCommandHandler.test.ts index 0dc73544..6094291f 100644 --- a/test/languages/application/term/command/create/createWordCommandHandler.test.ts +++ b/test/unit/languages/application/term/command/create/createWordCommandHandler.test.ts @@ -1,13 +1,13 @@ import { beforeEach, describe, expect, it, jest } from '@jest/globals'; import CreateWordCommandHandler from '@src/languages/application/term/command/create/createWordCommandHandler'; -import { EventBusMock } from '@test/shared/domain/buses/eventBus/eventBusMock'; -import { CreateWordCommandMother } from './createWordCommandMother'; -import WordMother from '@test/languages/domain/term/word/wordMother'; -import Word from '@src/languages/domain/term/word/word'; -import { WordCreatedEventMother } from '@test/languages/domain/term/word/wordCreatedEventMother'; -import { UserIdMother } from '@test/languages/domain/user/userIdMother'; +import { TermRepositoryMock } from '@test/unit/languages/domain/term/termRepositoryMock'; +import { EventBusMock } from '@test/unit/shared/domain/buses/eventBus/eventBusMock'; +import WordMother from '@test/unit/languages/domain/term/word/wordMother'; +import { CreateWordCommandMother } from '@test/unit/languages/application/term/command/create/createWordCommandMother'; import WordAlreadyExistsException from '@src/languages/domain/term/word/wordAlreadyExistsException'; -import { TermRepositoryMock } from '@test/languages/domain/term/termRepositoryMock'; +import { UserIdMother } from '@test/unit/languages/domain/user/userIdMother'; +import Word from '@src/languages/domain/term/word/word'; +import { WordCreatedEventMother } from '@test/unit/languages/domain/term/word/wordCreatedEventMother'; describe('CreateWordCommandHandler', () => { let eventBus: EventBusMock; diff --git a/test/languages/application/term/command/create/createWordCommandMother.ts b/test/unit/languages/application/term/command/create/createWordCommandMother.ts similarity index 100% rename from test/languages/application/term/command/create/createWordCommandMother.ts rename to test/unit/languages/application/term/command/create/createWordCommandMother.ts diff --git a/test/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts b/test/unit/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts similarity index 79% rename from test/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts rename to test/unit/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts index f60943e3..cf9c11ea 100644 --- a/test/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts +++ b/test/unit/languages/application/term/command/delete/deleteExpressionCommandHandler.test.ts @@ -1,8 +1,8 @@ import { beforeEach, describe, it } from '@jest/globals'; -import ExpressionMother from '@test/languages/domain/term/expression/expressionMother'; import DeleteExpressionCommandHandler from '@src/languages/application/term/command/delete/deleteExpressionCommandHandler'; -import { DeleteExpressionCommandMother } from './deleteExpressionCommandMother'; -import { TermRepositoryMock } from '@test/languages/domain/term/termRepositoryMock'; +import { TermRepositoryMock } from '@test/unit/languages/domain/term/termRepositoryMock'; +import ExpressionMother from '@test/unit/languages/domain/term/expression/expressionMother'; +import { DeleteExpressionCommandMother } from '@test/unit/languages/application/term/command/delete/deleteExpressionCommandMother'; describe('DeleteExpressionCommandHandler', () => { let termRepository: TermRepositoryMock; diff --git a/test/languages/application/term/command/delete/deleteExpressionCommandMother.ts b/test/unit/languages/application/term/command/delete/deleteExpressionCommandMother.ts similarity index 100% rename from test/languages/application/term/command/delete/deleteExpressionCommandMother.ts rename to test/unit/languages/application/term/command/delete/deleteExpressionCommandMother.ts diff --git a/test/languages/application/term/command/delete/deleteWordCommandHandler.test.ts b/test/unit/languages/application/term/command/delete/deleteWordCommandHandler.test.ts similarity index 79% rename from test/languages/application/term/command/delete/deleteWordCommandHandler.test.ts rename to test/unit/languages/application/term/command/delete/deleteWordCommandHandler.test.ts index a263d1e3..4781a711 100644 --- a/test/languages/application/term/command/delete/deleteWordCommandHandler.test.ts +++ b/test/unit/languages/application/term/command/delete/deleteWordCommandHandler.test.ts @@ -1,8 +1,8 @@ import { beforeEach, describe, it } from '@jest/globals'; import DeleteWordCommandHandler from '@src/languages/application/term/command/delete/deleteWordCommandHandler'; -import WordMother from '@test/languages/domain/term/word/wordMother'; -import { DeleteWordCommandMother } from './deleteWordCommandMother'; -import { TermRepositoryMock } from '@test/languages/domain/term/termRepositoryMock'; +import { TermRepositoryMock } from '@test/unit/languages/domain/term/termRepositoryMock'; +import WordMother from '@test/unit/languages/domain/term/word/wordMother'; +import { DeleteWordCommandMother } from '@test/unit/languages/application/term/command/delete/deleteWordCommandMother'; describe('DeleteWordCommandHandler', () => { let termRepository: TermRepositoryMock; diff --git a/test/languages/application/term/command/delete/deleteWordCommandMother.ts b/test/unit/languages/application/term/command/delete/deleteWordCommandMother.ts similarity index 100% rename from test/languages/application/term/command/delete/deleteWordCommandMother.ts rename to test/unit/languages/application/term/command/delete/deleteWordCommandMother.ts diff --git a/test/languages/application/term/query/search/searchTermQueryHandler.test.ts b/test/unit/languages/application/term/query/search/searchTermQueryHandler.test.ts similarity index 88% rename from test/languages/application/term/query/search/searchTermQueryHandler.test.ts rename to test/unit/languages/application/term/query/search/searchTermQueryHandler.test.ts index af4b5391..bac5ac63 100644 --- a/test/languages/application/term/query/search/searchTermQueryHandler.test.ts +++ b/test/unit/languages/application/term/query/search/searchTermQueryHandler.test.ts @@ -1,9 +1,9 @@ import { beforeEach, describe, expect, it } from '@jest/globals'; import { SearchTermQueryMother } from './searchTermQueryMother'; import SearchTermQueryHandler from '@src/languages/application/term/query/search/searchTermQueryHandler'; -import { TermViewMother } from '@test/languages/application/term/query/viewModel/termViewMother'; +import { SearchTermViewReadLayerMock } from '@test/unit/languages/application/term/query/search/searchTermViewReadLayerMock'; import { TermView } from '@src/languages/application/term/viewModel/termView'; -import { SearchTermViewReadLayerMock } from '@test/languages/application/term/query/search/searchTermViewReadLayerMock'; +import { TermViewMother } from '@test/unit/languages/application/term/query/viewModel/termViewMother'; describe('SearchTermQueryHandler', () => { let termRepository: SearchTermViewReadLayerMock; diff --git a/test/languages/application/term/query/search/searchTermQueryMother.ts b/test/unit/languages/application/term/query/search/searchTermQueryMother.ts similarity index 100% rename from test/languages/application/term/query/search/searchTermQueryMother.ts rename to test/unit/languages/application/term/query/search/searchTermQueryMother.ts diff --git a/test/languages/application/term/query/search/searchTermViewReadLayerMock.ts b/test/unit/languages/application/term/query/search/searchTermViewReadLayerMock.ts similarity index 85% rename from test/languages/application/term/query/search/searchTermViewReadLayerMock.ts rename to test/unit/languages/application/term/query/search/searchTermViewReadLayerMock.ts index 7d5120c8..ffccd12b 100644 --- a/test/languages/application/term/query/search/searchTermViewReadLayerMock.ts +++ b/test/unit/languages/application/term/query/search/searchTermViewReadLayerMock.ts @@ -5,9 +5,9 @@ import SearchTermViewReadLayer, { } from '@src/languages/application/term/query/search/searchTermViewReadLayer'; export class SearchTermViewReadLayerMock implements SearchTermViewReadLayer { - private searchMock: jest.Mock; - private saveMock: jest.Mock; - private terms: TermView[]; + private readonly searchMock: jest.Mock; + private readonly saveMock: jest.Mock; + private readonly terms: TermView[]; constructor() { this.searchMock = jest.fn(); diff --git a/test/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts b/test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts similarity index 81% rename from test/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts rename to test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts index f26208b4..d91ddecb 100644 --- a/test/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts +++ b/test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler.test.ts @@ -1,8 +1,8 @@ import { beforeEach, describe, expect, it } from '@jest/globals'; -import { TermViewMother } from '@test/languages/application/term/query/viewModel/termViewMother'; +import { FindSuggestionsTermReadLayerMock } from '@test/unit/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock'; import FindSuggestionsTermQueryHandler from '@src/languages/application/term/query/suggestion/findSuggestionsTermQueryHandler'; -import { FindSuggestionsTermQueryMother } from '@test/languages/application/term/query/suggestion/findSuggestionsTermQueryMother'; -import { FindSuggestionsTermReadLayerMock } from '@test/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock'; +import { FindSuggestionsTermQueryMother } from '@test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryMother'; +import { TermViewMother } from '@test/unit/languages/application/term/query/viewModel/termViewMother'; describe('FindSuggestionsTermQueryHandler', () => { let findSuggestionTermReadLayerMock: FindSuggestionsTermReadLayerMock; diff --git a/test/languages/application/term/query/suggestion/findSuggestionsTermQueryMother.ts b/test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryMother.ts similarity index 100% rename from test/languages/application/term/query/suggestion/findSuggestionsTermQueryMother.ts rename to test/unit/languages/application/term/query/suggestion/findSuggestionsTermQueryMother.ts diff --git a/test/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts b/test/unit/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts similarity index 94% rename from test/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts rename to test/unit/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts index 3bfa85ae..40ece9c1 100644 --- a/test/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts +++ b/test/unit/languages/application/term/query/suggestion/findSuggestionsTermReadLayerMock.ts @@ -5,7 +5,7 @@ import FindSuggestionsTermReadLayer from '@src/languages/application/term/query/ export class FindSuggestionsTermReadLayerMock implements FindSuggestionsTermReadLayer { private readonly findMock: jest.Mock; - private terms: TermView[]; + private readonly terms: TermView[]; constructor() { this.findMock = jest.fn(); diff --git a/test/languages/application/term/query/viewModel/termViewMother.ts b/test/unit/languages/application/term/query/viewModel/termViewMother.ts similarity index 89% rename from test/languages/application/term/query/viewModel/termViewMother.ts rename to test/unit/languages/application/term/query/viewModel/termViewMother.ts index c996a593..d7be7f62 100644 --- a/test/languages/application/term/query/viewModel/termViewMother.ts +++ b/test/unit/languages/application/term/query/viewModel/termViewMother.ts @@ -1,6 +1,6 @@ import { TermView } from '@src/languages/application/term/viewModel/termView'; import faker from 'faker'; -import TermTypeMother from '../../../../domain/term/termTypeMother'; +import TermTypeMother from '@test/unit/languages/domain/term/termTypeMother'; export class TermViewMother { static random(props?: Partial): TermView { diff --git a/test/languages/domain/auth/authSessionCreatedEventMother.ts b/test/unit/languages/domain/auth/authSessionCreatedEventMother.ts similarity index 100% rename from test/languages/domain/auth/authSessionCreatedEventMother.ts rename to test/unit/languages/domain/auth/authSessionCreatedEventMother.ts diff --git a/test/languages/domain/auth/authSessionIdMother.ts b/test/unit/languages/domain/auth/authSessionIdMother.ts similarity index 100% rename from test/languages/domain/auth/authSessionIdMother.ts rename to test/unit/languages/domain/auth/authSessionIdMother.ts diff --git a/test/languages/domain/auth/authSessionMother.ts b/test/unit/languages/domain/auth/authSessionMother.ts similarity index 88% rename from test/languages/domain/auth/authSessionMother.ts rename to test/unit/languages/domain/auth/authSessionMother.ts index 3fdd1875..76353025 100644 --- a/test/languages/domain/auth/authSessionMother.ts +++ b/test/unit/languages/domain/auth/authSessionMother.ts @@ -1,5 +1,5 @@ import { AuthSessionIdMother } from './authSessionIdMother'; -import AuthSession from '@src/languages/domain/auth/authSession'; +import AuthSession from '../../../../../src/languages/domain/auth/authSession'; import AuthSessionId from '@src/languages/domain/auth/authSessionId'; import { SessionMother } from './sessionMother'; import Session from '@src/languages/domain/auth/session'; diff --git a/test/languages/domain/auth/authSessionRepositoryMock.ts b/test/unit/languages/domain/auth/authSessionRepositoryMock.ts similarity index 100% rename from test/languages/domain/auth/authSessionRepositoryMock.ts rename to test/unit/languages/domain/auth/authSessionRepositoryMock.ts diff --git a/test/languages/domain/auth/sessionMother.ts b/test/unit/languages/domain/auth/sessionMother.ts similarity index 89% rename from test/languages/domain/auth/sessionMother.ts rename to test/unit/languages/domain/auth/sessionMother.ts index 3bfb4166..1da8b0ee 100644 --- a/test/languages/domain/auth/sessionMother.ts +++ b/test/unit/languages/domain/auth/sessionMother.ts @@ -1,5 +1,5 @@ import faker from 'faker'; -import Session from '@src/languages/domain/auth/session'; +import Session from '../../../../../src/languages/domain/auth/session'; export interface AuthSessionMotherProps { token?: string; diff --git a/test/languages/domain/auth/socialAuthenticatorMock.ts b/test/unit/languages/domain/auth/socialAuthenticatorMock.ts similarity index 100% rename from test/languages/domain/auth/socialAuthenticatorMock.ts rename to test/unit/languages/domain/auth/socialAuthenticatorMock.ts diff --git a/test/languages/domain/country/countryCreatedEventMother.ts b/test/unit/languages/domain/country/countryCreatedEventMother.ts similarity index 100% rename from test/languages/domain/country/countryCreatedEventMother.ts rename to test/unit/languages/domain/country/countryCreatedEventMother.ts diff --git a/test/languages/domain/country/countryIdMother.ts b/test/unit/languages/domain/country/countryIdMother.ts similarity index 100% rename from test/languages/domain/country/countryIdMother.ts rename to test/unit/languages/domain/country/countryIdMother.ts diff --git a/test/languages/domain/country/countryMother.ts b/test/unit/languages/domain/country/countryMother.ts similarity index 100% rename from test/languages/domain/country/countryMother.ts rename to test/unit/languages/domain/country/countryMother.ts diff --git a/test/languages/domain/country/countryRepositoryMock.ts b/test/unit/languages/domain/country/countryRepositoryMock.ts similarity index 100% rename from test/languages/domain/country/countryRepositoryMock.ts rename to test/unit/languages/domain/country/countryRepositoryMock.ts diff --git a/test/languages/domain/country/languageCollectionMother.ts b/test/unit/languages/domain/country/languageCollectionMother.ts similarity index 100% rename from test/languages/domain/country/languageCollectionMother.ts rename to test/unit/languages/domain/country/languageCollectionMother.ts diff --git a/test/languages/domain/country/languageMother.ts b/test/unit/languages/domain/country/languageMother.ts similarity index 100% rename from test/languages/domain/country/languageMother.ts rename to test/unit/languages/domain/country/languageMother.ts diff --git a/test/languages/domain/term/expression/expressionCreatedEventMother.ts b/test/unit/languages/domain/term/expression/expressionCreatedEventMother.ts similarity index 100% rename from test/languages/domain/term/expression/expressionCreatedEventMother.ts rename to test/unit/languages/domain/term/expression/expressionCreatedEventMother.ts diff --git a/test/languages/domain/term/expression/expressionMother.ts b/test/unit/languages/domain/term/expression/expressionMother.ts similarity index 96% rename from test/languages/domain/term/expression/expressionMother.ts rename to test/unit/languages/domain/term/expression/expressionMother.ts index 21653866..3a7ef59e 100644 --- a/test/languages/domain/term/expression/expressionMother.ts +++ b/test/unit/languages/domain/term/expression/expressionMother.ts @@ -10,8 +10,8 @@ import CountryId from '@src/languages/domain/country/countryId'; import ExpressionTermCollection from '@src/languages/domain/term/expression/expressionTermCollection'; import { UserIdMother } from '../../user/userIdMother'; import TermId from '@src/languages/domain/term/termId'; -import { TermIdMother } from '@test/languages/domain/term/termIdMother'; import TermType, { TermTypeEnum } from '@src/languages/domain/term/termType'; +import { TermIdMother } from '@test/unit/languages/domain/term/termIdMother'; interface ExpressionMotherProps { id?: TermId; diff --git a/test/languages/domain/term/expression/expressionTermCollectionMother.ts b/test/unit/languages/domain/term/expression/expressionTermCollectionMother.ts similarity index 100% rename from test/languages/domain/term/expression/expressionTermCollectionMother.ts rename to test/unit/languages/domain/term/expression/expressionTermCollectionMother.ts diff --git a/test/languages/domain/term/expression/expressionTermMother.ts b/test/unit/languages/domain/term/expression/expressionTermMother.ts similarity index 100% rename from test/languages/domain/term/expression/expressionTermMother.ts rename to test/unit/languages/domain/term/expression/expressionTermMother.ts diff --git a/test/languages/domain/term/termIdMother.ts b/test/unit/languages/domain/term/termIdMother.ts similarity index 100% rename from test/languages/domain/term/termIdMother.ts rename to test/unit/languages/domain/term/termIdMother.ts diff --git a/test/languages/domain/term/termRepositoryMock.ts b/test/unit/languages/domain/term/termRepositoryMock.ts similarity index 100% rename from test/languages/domain/term/termRepositoryMock.ts rename to test/unit/languages/domain/term/termRepositoryMock.ts diff --git a/test/languages/domain/term/termTypeMother.ts b/test/unit/languages/domain/term/termTypeMother.ts similarity index 100% rename from test/languages/domain/term/termTypeMother.ts rename to test/unit/languages/domain/term/termTypeMother.ts diff --git a/test/languages/domain/term/word/wordCreatedEventMother.ts b/test/unit/languages/domain/term/word/wordCreatedEventMother.ts similarity index 100% rename from test/languages/domain/term/word/wordCreatedEventMother.ts rename to test/unit/languages/domain/term/word/wordCreatedEventMother.ts diff --git a/test/languages/domain/term/word/wordMother.ts b/test/unit/languages/domain/term/word/wordMother.ts similarity index 96% rename from test/languages/domain/term/word/wordMother.ts rename to test/unit/languages/domain/term/word/wordMother.ts index 04ce240b..6709588f 100644 --- a/test/languages/domain/term/word/wordMother.ts +++ b/test/unit/languages/domain/term/word/wordMother.ts @@ -10,8 +10,8 @@ import WordTermCollection from '@src/languages/domain/term/word/wordTermCollecti import { UserIdMother } from '../../user/userIdMother'; import faker from 'faker'; import TermId from '@src/languages/domain/term/termId'; -import { TermIdMother } from '@test/languages/domain/term/termIdMother'; import TermType, { TermTypeEnum } from '@src/languages/domain/term/termType'; +import { TermIdMother } from '@test/unit/languages/domain/term/termIdMother'; interface WordMotherProps { id?: TermId; diff --git a/test/languages/domain/term/word/wordTermCollectionMother.ts b/test/unit/languages/domain/term/word/wordTermCollectionMother.ts similarity index 100% rename from test/languages/domain/term/word/wordTermCollectionMother.ts rename to test/unit/languages/domain/term/word/wordTermCollectionMother.ts diff --git a/test/languages/domain/term/word/wordTermMother.ts b/test/unit/languages/domain/term/word/wordTermMother.ts similarity index 100% rename from test/languages/domain/term/word/wordTermMother.ts rename to test/unit/languages/domain/term/word/wordTermMother.ts diff --git a/test/languages/domain/user/userIdMother.ts b/test/unit/languages/domain/user/userIdMother.ts similarity index 100% rename from test/languages/domain/user/userIdMother.ts rename to test/unit/languages/domain/user/userIdMother.ts diff --git a/test/languages/domain/user/userMother.ts b/test/unit/languages/domain/user/userMother.ts similarity index 100% rename from test/languages/domain/user/userMother.ts rename to test/unit/languages/domain/user/userMother.ts diff --git a/test/languages/domain/user/userRepositoryMock.ts b/test/unit/languages/domain/user/userRepositoryMock.ts similarity index 100% rename from test/languages/domain/user/userRepositoryMock.ts rename to test/unit/languages/domain/user/userRepositoryMock.ts diff --git a/test/shared/domain/buses/eventBus/eventBusMock.ts b/test/unit/shared/domain/buses/eventBus/eventBusMock.ts similarity index 100% rename from test/shared/domain/buses/eventBus/eventBusMock.ts rename to test/unit/shared/domain/buses/eventBus/eventBusMock.ts diff --git a/test/shared/domain/valueObjects/email.test.ts b/test/unit/shared/domain/valueObjects/email.test.ts similarity index 100% rename from test/shared/domain/valueObjects/email.test.ts rename to test/unit/shared/domain/valueObjects/email.test.ts