diff --git a/src/locales/en/commerce/product_description.ts b/src/locales/en/commerce/product_description.ts index ddaa271eaa5..d7a05361d82 100644 --- a/src/locales/en/commerce/product_description.ts +++ b/src/locales/en/commerce/product_description.ts @@ -1,14 +1,22 @@ export default [ - 'Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals', - "Boston's most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles", - 'Carbonite web goalkeeper gloves are ergonomically designed to give easy fit', - 'Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support', - 'New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016', - 'New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart', - 'The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design', - 'The Football Is Good For Training And Recreational Purposes', - 'The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J', - 'The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive', - 'The beautiful range of Apple Naturalé that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients', - 'The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality', + '{{commerce.productAdjective}} {{commerce.product}} designed with {{commerce.productMaterial}} for {{word.adjective}} performance', + "{{company.name}}'s most advanced {{commerce.product}} technology increases {{word.adjective}} capabilities", + 'New {{color.human}} {{commerce.product}} with ergonomic design for {{word.adjective}} comfort', + 'Ergonomic {{commerce.product}} made with {{commerce.productMaterial}} for all-day {{word.adjective}} support', + 'New {{commerce.product}} model with {{number.int({"min": 1, "max": 100})}} GB RAM, {{number.int({"min": 1, "max": 1000})}} GB storage, and {{word.adjective}} features', + 'Stylish {{commerce.product}} designed to make you stand out with {{word.adjective}} looks', + 'The {{company.catchPhrase}} {{commerce.product}} offers reliable performance and {{word.adjective}} design', + 'Professional-grade {{commerce.product}} perfect for {{word.adjective}} training and recreational use', + 'The {{person.firstName}} {{commerce.product}} is the latest in a series of {{word.adjective}} products from {{company.name}}', + 'Innovative {{commerce.product}} featuring {{word.adjective}} technology and {{commerce.productMaterial}} construction', + 'Discover the {{word.adjective}} new {{commerce.product}} with an exciting mix of {{commerce.productMaterial}} ingredients', + 'The sleek and {{word.adjective}} {{commerce.product}} comes with {{color.human}} LED lighting for smart functionality', + 'Introducing the {{location.country}}-inspired {{commerce.product}}, blending {{word.adjective}} style with local craftsmanship', + 'Our {{animal.type}}-friendly {{commerce.product}} ensures {{word.adjective}} comfort for your pets', + 'Experience the {{color.human}} brilliance of our {{commerce.product}}, perfect for {{word.adjective}} environments', + 'Savor the {{food.adjective}} essence in our {{commerce.product}}, designed for {{word.adjective}} culinary adventures', + 'Featuring {{science.chemical_element.name}}-enhanced technology, our {{commerce.product}} offers unparalleled {{word.adjective}} performance', + 'The {{color.human}} {{commerce.product}} combines {{location.country}} aesthetics with {{science.chemical_element.name}}-based durability', + 'Our {{food.adjective}}-inspired {{commerce.product}} brings a taste of luxury to your {{word.adjective}} lifestyle', + 'Discover the {{animal.type}}-like agility of our {{commerce.product}}, perfect for {{word.adjective}} users', ]; diff --git a/src/modules/commerce/index.ts b/src/modules/commerce/index.ts index 12ab94b8575..61dd9a9c2b9 100644 --- a/src/modules/commerce/index.ts +++ b/src/modules/commerce/index.ts @@ -254,12 +254,12 @@ export class CommerceModule extends ModuleBase { * Returns a product description. * * @example - * faker.commerce.productDescription() // 'Andy shoes are designed to keeping...' + * faker.commerce.productDescription() // 'Featuring Phosphorus-enhanced technology, our Fish offers unparalleled Modern performance' * * @since 5.0.0 */ productDescription(): string { - return this.faker.helpers.arrayElement( + return this.faker.helpers.fake( this.faker.definitions.commerce.product_description ); } diff --git a/test/modules/__snapshots__/commerce.spec.ts.snap b/test/modules/__snapshots__/commerce.spec.ts.snap index efad4c8ff0d..11dff82a2c8 100644 --- a/test/modules/__snapshots__/commerce.spec.ts.snap +++ b/test/modules/__snapshots__/commerce.spec.ts.snap @@ -30,7 +30,7 @@ exports[`commerce > 42 > product 1`] = `"Computer"`; exports[`commerce > 42 > productAdjective 1`] = `"Handcrafted"`; -exports[`commerce > 42 > productDescription 1`] = `"New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016"`; +exports[`commerce > 42 > productDescription 1`] = `"Professional-grade Towels perfect for pastel training and recreational use"`; exports[`commerce > 42 > productMaterial 1`] = `"Frozen"`; @@ -66,7 +66,7 @@ exports[`commerce > 1211 > product 1`] = `"Towels"`; exports[`commerce > 1211 > productAdjective 1`] = `"Tasty"`; -exports[`commerce > 1211 > productDescription 1`] = `"The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality"`; +exports[`commerce > 1211 > productDescription 1`] = `"Our delicious-inspired Tuna brings a taste of luxury to your right lifestyle"`; exports[`commerce > 1211 > productMaterial 1`] = `"Wooden"`; @@ -102,7 +102,7 @@ exports[`commerce > 1337 > product 1`] = `"Chicken"`; exports[`commerce > 1337 > productAdjective 1`] = `"Generic"`; -exports[`commerce > 1337 > productDescription 1`] = `"Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support"`; +exports[`commerce > 1337 > productDescription 1`] = `"Stylish Car designed to make you stand out with lawful looks"`; exports[`commerce > 1337 > productMaterial 1`] = `"Fresh"`; diff --git a/test/modules/commerce.spec.ts b/test/modules/commerce.spec.ts index e009e93057d..ceca3a1376b 100644 --- a/test/modules/commerce.spec.ts +++ b/test/modules/commerce.spec.ts @@ -187,11 +187,10 @@ describe('commerce', () => { }); describe(`productDescription()`, () => { - it('should return random value from product description array', () => { + it('should return a product description string', () => { const actual = faker.commerce.productDescription(); - expect(faker.definitions.commerce.product_description).toContain( - actual - ); + expect(actual).toBeTruthy(); + expect(actual).toBeTypeOf('string'); }); });