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

chore: test bundle code rather than all of ipfs #15

Merged
merged 3 commits into from
Oct 4, 2018

Conversation

olizilla
Copy link
Collaborator

@olizilla olizilla commented Oct 1, 2018

its very mock heavy, but our code depends on all the possible
ways of connecting to ipfs; our tests become horrible without some
judicious mocking out of dependencies.

It means we can now focus our tests on the logic of this module
rather than elaborate ipfs init tests. Also our tests no longer
fail if you happen to be running an ipfs daemon which is nice.

Also adds option to try accessing ipfs directly from companion
seperate from window.ipfs, and will try js-ipfs-api on the current
origin before trying the default value

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
its very mock heavy, but our code depends on _all_ the possible
ways of connecting to ipfs, our tests become horrible without some
judicious mocking out of dependencies.

It means we can now focus our tests on the logic of this module
rather than elaborate ipfs init tests. Also our tests no longer
fail if you happen to be running an ipfs daemon which is nice.

Also adds option to try accessing ipfs directly from companion
seperate from window.ipfs, and will try js-ipfs-api on the current
origin before trying the default value

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla olizilla changed the title [WIP] split out and test provider logic chore: test bundle code rather than all of ipfs Oct 2, 2018
@olizilla
Copy link
Collaborator Author

olizilla commented Oct 2, 2018

Fixes #4 as it now uses an ipfs.get with the empty dir as the connection check by default, and calling code can change it as required.

@olizilla
Copy link
Collaborator Author

olizilla commented Oct 2, 2018

More try/catching to do...

screenshot 2018-10-02 15 56 13

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
Copy link
Contributor

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Tested with ipfs/ipfs-webui#845 and works as advertised :)) 👍

2018-10-03--00-34-43

Copy link
Contributor

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

LGTM! 😄

Copy link
Contributor

@fsdiogo fsdiogo left a comment

Choose a reason for hiding this comment

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

👌

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

Successfully merging this pull request may close these issues.

4 participants