ifme
ifme copied to clipboard
Write unit tests for client/app/utils/index.js
Description
Write unit tests for client/app/utils/index.js
Functions include:
-
randomString
-
setCsrfToken
-
getPusher
-
renderContent
Please assign yourself (via the Assignees dropdown), if you do want to work on this issue. Can't find yourself? You need to join our organization.
Check out our Picking Up Issues guide if you haven't already!
I would like to give this a try @julianguyen
That would be great, thank you! Feel free to assign yourself to the issue @akk312000 :)
@julianguyen I'm not able assign the issue to myself, can you guide me how should I do that? I'm not able to see the "assign yourself" button near Assignees field
@akk312000 Ahh looks like you're not added to the project org. I just sent you an invitation and assigned you.
@julianguyen I am investigating this and I wanted to ask if I am supposed to create __tests__
folder in utils to write the corresponding tests for index.js. Please let me know :)
Hello @julianguyen,
I noticed that in package.json jest configurations
there's "testRegex": "./app/.*.spec\\.jsx?$"
meaning that this regex will only capture the test files which includes spec
in the filename. I am writing my tests under the name index.test.js
. Do you suggest updating the regexp? Or do the unit test files need to be somewhere else with a different naming convention?
@julianguyen What else needs to be done on this issue? Unit tests for setCsrfToken and renderContent?
@lucas-codes-stuff that is correct!