Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests at generator module [discussion] #220

Open
atherdon opened this issue Aug 16, 2019 · 27 comments
Open

Tests at generator module [discussion] #220

atherdon opened this issue Aug 16, 2019 · 27 comments
Labels

Comments

@atherdon
Copy link
Contributor

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.

@atherdon
Copy link
Contributor Author

you may also watch this video: #209 (comment)
it can help to understand what we're actually doing here

@atherdon atherdon added the tests label Aug 17, 2019
@atherdon
Copy link
Contributor Author

another thread about tests: #132

@oksanafrankiv
Copy link
Contributor

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.

@atherdon
Copy link
Contributor Author

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

@atherdon
Copy link
Contributor Author

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.

@atherdon
Copy link
Contributor Author

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

@atherdon
Copy link
Contributor Author

atherdon commented Aug 17, 2019 via email

@oksanafrankiv
Copy link
Contributor

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!

@atherdon
Copy link
Contributor Author

Sure, I'll share them soon

@oksanafrankiv
Copy link
Contributor

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.

@atherdon
Copy link
Contributor Author

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.

@atherdon
Copy link
Contributor Author

please check this video: https://www.loom.com/share/71d0764686b34482b118e560f11ff974

@atherdon
Copy link
Contributor Author

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

@atherdon
Copy link
Contributor Author

atherdon commented Sep 2, 2019

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

@vadim9999
Copy link
Collaborator

This comment is for me?

@atherdon
Copy link
Contributor Author

atherdon commented Sep 2, 2019

@vadim9999 no, it's for @oksanafrankiv actually.
But you have some time for some contribution - let me know

@oksanafrankiv
Copy link
Contributor

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?

@atherdon
Copy link
Contributor Author

atherdon commented Sep 3, 2019 via email

@atherdon
Copy link
Contributor Author

atherdon commented Sep 5, 2019

@oksanafrankiv let's discuss what we should do next

@oksanafrankiv
Copy link
Contributor

Yes, sure!

@atherdon
Copy link
Contributor Author

atherdon commented Sep 5, 2019

  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

@oksanafrankiv
Copy link
Contributor

Sounds good. I'll work on those files.

@atherdon
Copy link
Contributor Author

atherdon commented Sep 5, 2019 via email

@oksanafrankiv
Copy link
Contributor

Ok I'll work on option 1.

@atherdon
Copy link
Contributor Author

atherdon commented Sep 5, 2019

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

@oksanafrankiv
Copy link
Contributor

I'll work on option 2.

@atherdon
Copy link
Contributor Author

ok, great - tell me if you need more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants