diff --git a/src/functions/customer/services/availability.spec.ts b/src/functions/customer/services/availability.spec.ts index bcb658eb..2f26ca62 100644 --- a/src/functions/customer/services/availability.spec.ts +++ b/src/functions/customer/services/availability.spec.ts @@ -24,14 +24,14 @@ jest.mock("~/functions/lookup", () => { origin: { name: faker.person.firstName(), customerId: faker.number.int({ min: 1, max: 100000 }), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), distanceHourlyRate: faker.number.int({ min: 1, max: 5 }), fixedRatePerKm: faker.number.int({ min: 1, max: 5 }), minDistanceForFree: faker.number.int({ min: 1, max: 5 }), }, destination: { name: faker.person.firstName(), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), }, duration: { text: "14 mins", diff --git a/src/functions/lookup/lookup.service.spec.ts b/src/functions/lookup/lookup.service.spec.ts index c4d9ce2a..f727b6f5 100644 --- a/src/functions/lookup/lookup.service.spec.ts +++ b/src/functions/lookup/lookup.service.spec.ts @@ -11,7 +11,7 @@ jest.mock("~/functions/location/services", () => { _id: new mongoose.Types.ObjectId(), name: faker.person.firstName(), customerId: faker.number.int({ min: 1, max: 100000 }), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), distanceHourlyRate: faker.number.int({ min: 1, max: 5 }), fixedRatePerKm: faker.number.int({ min: 1, max: 5 }), minDistanceForFree: faker.number.int({ min: 1, max: 5 }), diff --git a/src/functions/shipping/shipping.service.spec.ts b/src/functions/shipping/shipping.service.spec.ts index 14744824..67339f67 100644 --- a/src/functions/shipping/shipping.service.spec.ts +++ b/src/functions/shipping/shipping.service.spec.ts @@ -20,14 +20,14 @@ describe("ShippingService", () => { origin: { name: faker.person.firstName(), customerId: faker.number.int({ min: 1, max: 100000 }), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), distanceHourlyRate: 100, fixedRatePerKm: 20, minDistanceForFree: 5, }, destination: { name: faker.person.firstName(), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), }, duration: { text: "1 hour", @@ -46,14 +46,14 @@ describe("ShippingService", () => { origin: { name: faker.person.firstName(), customerId: faker.number.int({ min: 1, max: 100000 }), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), distanceHourlyRate: 100, fixedRatePerKm: 20, minDistanceForFree: 5, }, destination: { name: faker.person.firstName(), - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), }, duration: { text: "1 hour", diff --git a/src/library/jest/helpers/location.ts b/src/library/jest/helpers/location.ts index 4231127c..27429ef9 100644 --- a/src/library/jest/helpers/location.ts +++ b/src/library/jest/helpers/location.ts @@ -14,7 +14,7 @@ export const getLocationObject = (props: Partial = {}): Location => ({ customerId: faker.number.int({ min: 1, max: 100000 }), locationType: LocationTypes.ORIGIN, originType: LocationOriginTypes.COMMERCIAL, - fullAddress: faker.address.streetAddress(), + fullAddress: faker.location.streetAddress(), distanceHourlyRate: faker.number.int({ min: 1, max: 5 }), fixedRatePerKm: faker.number.int({ min: 1, max: 5 }), minDistanceForFree: faker.number.int({ min: 1, max: 5 }), diff --git a/src/library/jest/helpers/schedule.ts b/src/library/jest/helpers/schedule.ts index 14592fdd..636871e5 100644 --- a/src/library/jest/helpers/schedule.ts +++ b/src/library/jest/helpers/schedule.ts @@ -38,7 +38,7 @@ export const getScheduleObject = ( })); return { - name: faker.random.word(), + name: faker.word.sample(), customerId: faker.number.int(), slots, products,