Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

feat: pass config to jsipfs fallback #21

Closed
wants to merge 1 commit into from

Conversation

fsdiogo
Copy link
Contributor

@fsdiogo fsdiogo commented Dec 11, 2018

To solve ipfs-shipyard/ipfs-share-files#63 and to make the ipfs-redux-bundle more versatile, this PR enables passing a custom config to jsipfs!

@fsdiogo fsdiogo added the enhancement New feature or request label Dec 11, 2018
expect(res.ipfs).toEqual(mockIpfs)
expect(res.provider).toEqual('js-ipfs')
expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1)
expect(opts.initJsIpfs.mock.calls.length).toBe(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should test that the custom config gets passed to the jsipfs constructor; that the new thing that this feature adds. If you keep a ref to the jsipfs constructor mock, I believe you can assert that it was called with specific arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm makes sense, but that is inside the promiseMeJsIpfs function that is outside the scope of the test. Not sure how to do that 🤔

@lidel
Copy link
Contributor

lidel commented Aug 7, 2020

Superseded by #42.
If still needed, should be reopened against ipfs-provider.

@lidel lidel closed this Aug 7, 2020
@lidel lidel deleted the feat/pass-config-to-jsipfs-fallback branch September 22, 2020 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants