Skip to content

Product testing#109

Open
chaitanya005 wants to merge 3 commits into
masterfrom
product-testing
Open

Product testing#109
chaitanya005 wants to merge 3 commits into
masterfrom
product-testing

Conversation

@chaitanya005

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread server/tests/unit/products.test.js Outdated
Comment on lines +59 to +66
fieldname: "file",
originalname: "rohtang-pass-4.jpg",
encoding: "7bit",
mimetype: "image/jpeg",
destination: "./images",
filename: "1650453223929--rohtang-pass-4.jpg",
path: "images/1650453223929--rohtang-pass-4.jpg",
size: 32163,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see if you can use Faker to generate random images instead of hard-coding

Comment thread server/tests/unit/products.test.js Outdated
Comment on lines +50 to +53
price: 1500,
size: "M",
color: "WHITE",
type: "SDKJF",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use faker and don't hard-code these values

await editVariant(req, res);
expect(res.statusCode);
});
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of test cases are missing..
check what will happen if I type different kind of date for every form field that I have.
What will happen if I give more data or wrong datatype
what if I write js inside the form field
There is a lot that we should test to make sure the form cannot be broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants