Details
- Install dependency
npm i karma-mocha-reporter --save-dev
- Add plugin to karma.conf.js
require('karma-mocha-reporter')
- Change Report
reporters: ['mocha']
, - Change
browsers: ['ChromeHeadless']
Details
npm i faker-js/faker --save-dev
npm install --save-dev @faker-js/faker
const {commerce, datatype, image} = faker;
return {
id: datatype.uuid(),
taxes: 2,
category: {
id: datatype.number(),
name: commerce.department()
},
description: commerce.productDescription(),
images: [image.imageUrl(), image.imageUrl()],
price: parseInt(commerce.price()),
title: commerce.productName()
};