Open atherdon opened 5 years ago
you may also watch this video: https://github.com/GroceriStar/food-static-files-generator/issues/209#issuecomment-519591165 it can help to understand what we're actually doing here
another thread about tests: https://github.com/GroceriStar/food-static-files-generator/issues/132
I don't have an experience working with JEST. I could use some resources to learn it.
I familarizing myself with the project. I've cloned the repository and ran tests.
Today I make a review of code as well. Not sure actually if we have a lot of tests here, actually. But we'll make it work - i'll spend more time and prepare notes for tests
this is my repository with articles about Jest. it's not formatted yet - lazy to do it. https://github.com/ChickenKyiv/awesome-jest-articles but take a look, please
This books is the best way to start from scratch: https://github.com/ChickenKyiv/awesome-jest-articles/blob/master/README.md#this-is-my-king-httpsflaviocopescomjest
but we need to keep a balance between learning and practice. because there a lot of tools at jest universe. So you can start with basic things and then we will start with simple tests only for practice. I'm a fan of practice, because it give a real experience.
tell me if you'll have issues with local project setup. this is not a nodejs server project - it's not possible to run it locally without creating a build. and build is created by rollup - so things a tricky. but it;s a great workflow for coding independent modules
tell me please also about your git skills as well. I have few courses prepared, can share them with you
I didn't have problems with the project set up. I have basic knowledge of GIT, but I would like to learn more about it. If you would share those courses with me that would be great! Thanks!
Sure, I'll share them soon
I reviewed lots of materials about Jest over the couple days. Now I want to try to wright some tests. Could you please specify which functions should be covered by tests first? Any suggestions where to start, any notes would be greatly appreciated.
Sure, will do it today it's also a good time for writing tests at this module - we have a big update coming, but right now we didn't start to work on it. and I saw that here we have a lot of code commented on test.
please check this video: https://www.loom.com/share/71d0764686b34482b118e560f11ff974
as mentioned, links to my 2 git courses: The first course was touching only basics, but I share some cool insights there as well. Free link: https://www.udemy.com/course/git-basics-and-merging-process/?couponCode=HACKERNOONROCKS
the second course explore how to use git as team member free link: https://www.udemy.com/course/git-workflows-in-depth/?couponCode=EUGENE
I assume we need to have a better plan because i feel like you stuck a bit. Just think that if you'll make a first pull request with your simple code changes - it'll be more easy for you to move it forward. I'm ok if you busy - take as much time as you want/need - just use me if you need help
This comment is for me?
@vadim9999 no, it's for @oksanafrankiv actually. But you have some time for some contribution - let me know
I tried to make the pull request, but I'm denied the access to repository. It seems that I can't create the remote branch. Do you have any suggestions?
Sure, no problem
we're using forking workflow - about details - check my 2nd git course - so in order to be able to code together -you should fork our main repository - put your changes at that forked version and only then you'll be able to open pull request
@oksanafrankiv let's discuss what we should do next
Yes, sure!
1) I think we can add missing test for a method at fileSystem
2) we can make work index.test.js - main goal for that file: be less paranoid, and understand that methods, that we exporting to the outside(so they can be called by other modules) are connected/imported correctly and
3) as you may notice - we have file testMethods
with 2 methods, that testing if generated json files have the correct structure. it was work-on-progress, but maybe we can slowly make it work and push me to finish tasks that i'm lazy to do now :)
btw, I'm making some changes at the configuration and inside at src
folder, so you'll need to sync your fork when i'll push my changes. Also, I make a release to npm with changes from your last PR.
tell me what do you think and what we should do next
Sounds good. I'll work on those files.
let's pick one of those options :) tell me what item you'll start to work on?
btw, i made changes at main repository - please sync your fork. if it'll be not clear - tell me - i'll help
Ok I'll work on option 1.
ok, cool - if you need help of stuck at something - just open new PR and i'll be able to look at your code changes locally
I'll work on option 2.
ok, great - tell me if you need more information
Is your feature request related to a problem? Please describe. @oksanafrankiv this will be our task for discussion tests at this simple module.
Partially - we start to add tests, but we never focused on 100% coverage. So let's make this current version of the module covered with tests and then we'll extend tests, because soon this module will be upgraded(major part will be the same, but logic will be less confusing and have less size)
Question: tell me about your JEST knowledge. it's totally fine if you'll need time to learn it. I have a lot of great resources, related to Jest lib.