Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
316 stars 157 forks source link

[Tests] Setup Jest testing framework #318

Closed kalimar closed 3 years ago

kalimar commented 4 years ago

https://jestjs.io/

sowmiyamuthuraman commented 4 years ago

can i work on this?

mirandawang commented 4 years ago

@sowmiyamuthuraman Are you still interested in working on this? We would love your help!

kalimar commented 4 years ago

@sowmiyamuthuraman We added some additional notes here https://github.com/Terrastories/terrastories/milestone/7 Apologies for the vague early tickets here. For completeness, we'll want to add documentation on how to run tests and add at least one test to confirm everything works. Please let us know if you have any questions.

sowmiyamuthuraman commented 4 years ago

@kalimar there is already a setup specified for jest in package.json. "jest": { "setupFiles": [ "<rootDir>/spec/javascript/i18n-mock.js" ], "roots": [ "spec/javascript" ], "collectCoverage": true, "coverageDirectory": "spec/javascript/coverage", "collectCoverageFrom": [ "**/*.{js,jsx}", "!**/node_modules/**", "!**/spec/javascript/coverage/**" ], "moduleDirectories": [ "node_modules" ] }

but I couldn't find any javascript/i18n-mock.js file in the spec folder? can you please help me with this?

kalimar commented 4 years ago

@sowmiyamuthuraman you can assume those settings are incorrect, they carried over from our old development environment. No one added mocks yet either. My plan was to try some of the options from the i18n docs https://react.i18next.com/misc/testing. Let me know if that helps.