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

basic tests. part1 #39

Open
atherdon opened this issue Jan 24, 2019 · 12 comments
Open

basic tests. part1 #39

atherdon opened this issue Jan 24, 2019 · 12 comments

Comments

@atherdon
Copy link
Member

atherdon commented Jan 24, 2019

all RenderList* components should have *test file with describe, related to passing data attribute.

sample of how we use one fo these components:

<View style={styles.direction}>
            <RenderLists2 data={data} />

          </View>

Note: by default data is array, but pay attention.

@atherdon
Copy link
Member Author

atherdon commented Feb 5, 2019

@souzasmatheus
Copy link
Contributor

describe('basic test', () => {
it('Renderlist has data attribute', () => {
const renderList = shallow();
const data = renderList.node.props.data;
expect(data).toBe('data')
})
})

@atherdon
Copy link
Member Author

atherdon commented Feb 5, 2019

i think it looks good. maybe it better to have a more self-explanatory string at describe.
But at overall - it's good. fork this repo, update code and create a pull request with your changes

@souzasmatheus
Copy link
Contributor

souzasmatheus commented Feb 5, 2019 via email

@atherdon
Copy link
Member Author

@souzasmatheus what do you think if i'll help you to fix this task and we'll jump into the next one?

@souzasmatheus
Copy link
Contributor

@atherdon I am actually studying Jest and Enzyme in order to learn how to fix that. But if you think we should jump into another task, that's ok for me :)

@atherdon
Copy link
Member Author

@souzasmatheus it's a great news! I think it's just was not very clear task, and this is why we stuck with it.
And yeah, as your teacher - i see that tests will help you to master React better and tests are next task for you too. As we have a few repositories with a similar purpose - to move away some of our components and create a great coverage for them - we have a lot of room for tasks and tests

@souzasmatheus
Copy link
Contributor

@atherdon Awesome! What should I do next then?

@atherdon
Copy link
Member Author

check this two quick things #40 #41

@atherdon
Copy link
Member Author

for you and for our other react developers i create this set of articles, related to Jest. it's not formatted, but it will be soon or later :) https://github.com/ChickenKyiv/awesome-jest-articles

But my personal favorite is https://flaviocopes.com/jest/

@souzasmatheus
Copy link
Contributor

Thank you! I will read as soon as possible.

@atherdon
Copy link
Member Author

@souzasmatheus we make a big update at current repository. When you'll be able to continue - you'll need to sync your fork - because our current changes can break your code

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

No branches or pull requests

2 participants