GroceriStar / groceristar-fetch

json arrays for Food Tech projects
https://groceristar.github.io/groceristar-fetch/
GNU General Public License v3.0
8 stars 18 forks source link

Testing part. main task #45

Open atherdon opened 6 years ago

atherdon commented 6 years ago

So we have a lot of json files in our plugin. Let's call it elements.

As you can see - a lot of tests are similar. What do you think - can we improve this?

Btw, this task is about intro you to our project, so don't hesitate to ask questions

In order to submit your changes to our plugin you should fork it, apply changes and submit a pull request

atherdon commented 6 years ago

I'm moving your questions here, it's better for the process.

Is there a webpage that i can validate or see if the test coverage can be increased to?Can you give some more details? Is there a *.js file that you can share ?

can you ask the same kind of questions at Github? i'm not developling this module, so i'm quite not sure. But maybe guys will help us.

What i'm 100% sure - when you create a pull request and add your changes(commits), it'll trigger a build in Travis CI, and Travis will run all test coverage. Check this video, it's cool https://www.youtube.com/watch?v=Uft5KBimzyk

Vidhya3 commented 6 years ago

Hi,

Can someone who is developing the above module help me out?Below are my questions:

Is there a webpage that i can validate or see if the test coverage can be increased to?Can you give some more details? Is there a *.js file that you can share ?

Thanks!

atherdon commented 6 years ago

@vadim9999 can you help us?

vadim9999 commented 6 years ago

@Vidhya3 We have 3 sections groceristar.js, chickenKyiv.js and search.js. In this files are methods that gets date from json's file. Also we have groceristar.test.js, chickenKyiv.test.js and search.test.js. When you create pull request Travis CI runs all this tests. In bottom of pull request you will see this image Then you should click "Show all checks" after click "Details". You will see console that inform you about what tests are passed or failed. For example groceristar.js have method

module.getIngredients = function() {
    return parser( ingredients )
}

in groceristar.test.js

test('ingredients file is set', () => {
    var stream = groceristar.getIngredients()
    expect(stream).not.toBe('')
  })
atherdon commented 6 years ago

you can also grab that repo to your local Mac, and run yarn run test or npm run test

atherdon commented 6 years ago

https://github.com/GroceriStar/groceristar-fetch/invitations

atherdon commented 6 years ago

i created a video that showing how tests works on this module. i was a bit sleepy, so my speetch was not clear :)

hope it'll help. tell us if you have some other questions https://www.useloom.com/share/ee9fbe848d644d868bed986f0307db19 @Vidhya3

atherdon commented 5 years ago

@Vidhya3 tell me if you will be interested to continue this task