You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'
.
Consider something like:
import { shallow } from 'enzyme'; | |
import ExampleComponent from './ExampleComponent'; | |
describe('ExampleComponent', () => { | |
it('fetches data from server when server returns a successful response', done => { // 1 | |
const mockSuccessResponse = {}; | |
const mockJsonPromise = Promise.resolve(mockSuccessResponse); // 2 | |
const mockFetchPromise = Promise.resolve({ // 3 | |
json: () => mockJsonPromise, |
This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.
If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.