Skip to content

Commit

Permalink
refactor deprecated faker-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan committed Jan 15, 2025
1 parent 9ea2c05 commit 23fe4d0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
faker.string.uuid(),
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
faker.lorem.word(),
undefined,
);
Expand Down Expand Up @@ -115,8 +115,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1A',
undefined,
);
Expand All @@ -125,8 +125,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1B',
undefined,
);
Expand All @@ -135,8 +135,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgang2.id,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1C',
undefined,
);
Expand Down Expand Up @@ -196,8 +196,8 @@ describe('ImportDataRepository', () => {
createdImportDataItem.status = ImportDataItemStatus.SUCCESS;
const savedImportDataItem: ImportDataItem<true> = await sut.save(createdImportDataItem);

savedImportDataItem.nachname = faker.name.lastName();
savedImportDataItem.vorname = faker.name.firstName();
savedImportDataItem.nachname = faker.person.lastName();
savedImportDataItem.vorname = faker.person.firstName();
savedImportDataItem.klasse = '1A';
savedImportDataItem.status = ImportDataItemStatus.SUCCESS;

Expand Down Expand Up @@ -237,8 +237,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1A',
undefined,
);
Expand All @@ -247,8 +247,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1B',
undefined,
);
Expand Down Expand Up @@ -319,8 +319,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1A',
undefined,
);
Expand All @@ -329,8 +329,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1B',
undefined,
);
Expand All @@ -339,8 +339,8 @@ describe('ImportDataRepository', () => {
faker.date.past(),
faker.date.recent(),
importvorgangId,
faker.name.lastName(),
faker.name.firstName(),
faker.person.lastName(),
faker.person.firstName(),
'1C',
undefined,
);
Expand Down
8 changes: 4 additions & 4 deletions src/modules/rolle/domain/rolle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ describe('Rolle Aggregate', () => {
serviceProviderRepoMock.findById.mockResolvedValue(undefined);
const result: Rolle<true> | DomainError = await rolleFactory.update(
faker.string.uuid(),
faker.datatype.datetime(),
faker.datatype.datetime(),
faker.date.past(),
faker.date.recent(),
1,
'newName',
faker.string.uuid(),
Expand All @@ -611,8 +611,8 @@ describe('Rolle Aggregate', () => {
serviceProviderRepoMock.findById.mockResolvedValue(undefined);
const result: Rolle<true> | DomainError = await rolleFactory.update(
faker.string.uuid(),
faker.datatype.datetime(),
faker.datatype.datetime(),
faker.date.past(),
faker.date.recent(),
1,
' newName',
faker.string.uuid(),
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rolle/repo/rolle.repo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('RolleRepo', () => {
it('should update an existing rolle', async () => {
const existingRolle: Rolle<true> | DomainError = await sut.save(DoFactory.createRolle(false));
if (existingRolle instanceof DomainError) throw Error();
existingRolle.name = faker.name.firstName();
existingRolle.name = faker.person.firstName();

const savedRolle: Rolle<true> | DomainError = await sut.save(existingRolle);
if (savedRolle instanceof DomainError) throw Error();
Expand Down

0 comments on commit 23fe4d0

Please sign in to comment.