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

docs: update complex example #806

Merged

Conversation

lidoravitan
Copy link
Contributor

@lidoravitan lidoravitan commented Oct 26, 2020

What:
I update README.md complex example section. So, the test will be valid.
Why:

  1. There was missing variable.
  2. I have seen that the promise always succeeds, so the tests always fail. The Promise returned from fetch() won’t reject on HTTP error status even if the response is an HTTP 404 or 500(reference).

How:
I added the missing variable and fixed the promise to reject in case of 200< status code.

Checklist:

  • Documentation added to the
    docs site - N/A
  • Tests - N/A
  • Typescript definitions updated - N/A
  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d323661:

Sandbox Source
React Configuration
kentcdodds/react-testing-library-examples Configuration

Copy link
Member

@MatanBobi MatanBobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@kentcdodds
Copy link
Member

@all-contributors please add @lidoravitan for docs

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @lidoravitan! 🎉

@MatanBobi
Copy link
Member

@kentcdodds It looks like the build failed for node in typecheck step, but it doesn't seem related to this PR.. Any ideas?

@kentcdodds
Copy link
Member

Node 15 messed things up with npx: npm/cli#1935

I think we should just get rid of node from the travis config personally.

@MatanBobi
Copy link
Member

MatanBobi commented Oct 26, 2020

Node 15 messed things up with npx: npm/cli#1935

I think we should just get rid of node from the travis config personally.

Cool, wasn't aware of that even happening, thanks!
I can take that if you think we should do it.
But this will leave us with 10.14.2, 12 and 14, is that ok?

@kentcdodds
Copy link
Member

Yeah. I'm not sure why we'd need to test on node 15 🤷‍♂️

@kentcdodds
Copy link
Member

I mean, I understand that it could help us address breaking changes in the future, but it's unlikely that will be a problem for us to solve anyway.

@kentcdodds
Copy link
Member

What would be even better is if a failure of node does not trigger a build failure but rather could just be a warning of some kind.

@testing-library-bot
Copy link

🎉 This PR is included in version 11.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants