casa icon indicating copy to clipboard operation
casa copied to clipboard

Jest test for showAlert function

Open FireLemons opened this issue 4 years ago • 7 comments

Description Write a test for showAlert in app/javascript/src/casa_case.js

see app/javascript/__tests__/case_contact.test.js for an example

FireLemons avatar Aug 20 '21 04:08 FireLemons

ok so i went through both the codes the testing is done in jest and i understood that i need to export the const alertEl that is required for testing but what should i do in the expect part of the code.

siddharth1704 avatar Aug 20 '21 07:08 siddharth1704

i am a begginer and this seems to be an easy task can you assign me this

siddharth1704 avatar Aug 20 '21 10:08 siddharth1704

@siddharth1704 welcome! :)

compwron avatar Aug 20 '21 15:08 compwron

@siddharth1704 to answer your question- please write a test asserting correct behavior for the code. So if the code shows an alert with data, assert that the alert is shown and the data is correct :)

compwron avatar Aug 20 '21 15:08 compwron

@siddharth1704 I'm trying this myself and it's way harder than I thought it'd be. Let me know if you get stuck

FireLemons avatar Aug 29 '21 02:08 FireLemons

This issue has been inactive for 262 hours (10.92 days) and will be automatically unassigned after 98 more hours (4.08 days).

github-actions[bot] avatar Sep 09 '21 00:09 github-actions[bot]

This issue has been inactive for 382 hours (15.92 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.

github-actions[bot] avatar Sep 14 '21 00:09 github-actions[bot]

Can i work on this issue?

joaovitoras avatar Oct 22 '22 14:10 joaovitoras