ReForum icon indicating copy to clipboard operation
ReForum copied to clipboard

Add tests

Open jboxman opened this issue 7 years ago • 7 comments

Hi.

This is a cool project. Thanks for making it. I'm going through the code now and working on devising unit tests, as best I can. When I'm done, I'll send a pull request.

Thanks.

jboxman avatar Jun 16 '17 22:06 jboxman

Hey man, Thank you. It would be great if you could add the tests. Jest is already in the packages. You can use it to perform the tests.

proshoumma avatar Jun 18 '17 03:06 proshoumma

I've been working through adding tests for the backend. I've used tape for this as it is what I am most familiar with. (Jest throws a stack trace when trying to mock Mongoose; it's a known issue that isn't fixed yet.) I'll use Jest for the frontend testing when I get that far.

Thanks.

jboxman avatar Jun 22 '17 16:06 jboxman

Thank you Shoumma for this beautiful forum presented by react node mongo. I am also doing my forum using this framework right now, everything was doing well but i encountered a problem and could not get it solved by myself.

i always use create react app for my projects before and there always be 2 servers in dev mode.

this thing maybe because of the webpack stuff.

i was trying to create some new parts showing other info. actions and reducers were created under the Views folder(for eg. Views/Map/actions and Views/Map/reducers. I also edited the App/store to combine that reducer with other reducers (combineReducers({......, mapData:mapReducer}), however, it looks like in the Views/Map/index page, this.props.mapData always show its initial state which initialized in the reducer without get rerendered. could anyone help? thank you!

marcmoo avatar Dec 20 '17 23:12 marcmoo

here is my code: https://reforum-app.herokuapp.com/general/discussion/could_anyone_help_me__reducer_state_doesn_t_get_rerenderd_in_index_js_5a3afc604584ca000458dd82

marcmoo avatar Dec 21 '17 02:12 marcmoo

@gogogous88 could you please provide your repo link so I can make a better look?

proshoumma avatar Dec 21 '17 07:12 proshoumma

@shoumma, i figured it out....only because {} was left over for a case import..... thank you again everything going fine right now!

marcmoo avatar Dec 21 '17 16:12 marcmoo

@gogogous88 glad that you figured out the issue. 👍

proshoumma avatar Dec 22 '17 07:12 proshoumma