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

chore: add test to verified fetch example #290

Merged
merged 3 commits into from
Feb 10, 2024

Conversation

achingbrain
Copy link
Contributor

@achingbrain achingbrain commented Feb 9, 2024

Adds a test for JSON, DAG-JSON and DAG-CBOR data, though DAG-CBOR doesn't seem to work currently - ipfs/helia#426

Adds a test for JSON-codec data
Copy link
Contributor

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

this is great

// blockstore with test data
defaultConfig.resolve ??= {}
defaultConfig.resolve.alias ??= {}
defaultConfig.resolve.alias['blockstore-core'] = resolve(process.cwd(), 'test/blockstore.js')
Copy link
Contributor

Choose a reason for hiding this comment

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

That's neat!

Copy link
Contributor

@2color 2color left a comment

Choose a reason for hiding this comment

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

Thanks, very cool!

@2color 2color merged commit 32450e4 into add-verified-fetch Feb 10, 2024
20 checks passed
@2color 2color deleted the add-test-to-verified-fetch branch February 10, 2024 20:46
2color added a commit that referenced this pull request Mar 28, 2024
* feat: add helia/verified-fetch browser example

* feat(verified-fetch): improve UX (#286)

* Update examples/helia-browser-react-verified-fetch/package.json

Co-authored-by: Alex Potsides <alex@achingbrain.net>

* refactor: clean up code and reduce deps

* chore: rename folder

* chore: add test

* chore: fix linting

* chore: add test to verified fetch example  (#290)

* chore: add test to verified fetch example

Adds a test for JSON-codec data

* chore: test verified fetch during ci

* chore: add tests for other types

* fix: improve rendering of cids on narrow viewports

* fix: improve auto content detection

* chore: fix tests

* chore: upgrade verified-fetch

* feat: add link to the repo

* chore: bump verified fetch version

* fix: add aborting functionality

* fix: handle abort error

* feat: add ability to fetch as dag-json

* chore: update deps

* chore: remove comment

* chore: address feedback and simplify code

* chore: reduce code duplication and add docs

* feat: add links to api docs and source

* fix: linting error

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: Alex Potsides <alex@achingbrain.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants