Skip to content

test: Implement Unit Tests for Web3.Storage Integration and QR Code Generation #49

@akhileshthite

Description

@akhileshthite

As the codebase grows, it's important to ensure that the core functionalities related to Web3.Storage uploads and QR code generation remain robust and error-free. This issue aims to introduce unit tests that ensure the integrity of these functionalities.

TODOs:

  • Write unit tests to ensure that the web3.storage is correctly uploading files and folders to IPFS.
  • Write tests to ensure that upon successful upload, a QR code is generated correctly.
  • The tests can be written using a popular testing framework like mocha.
  • Upon running npm run test, the results of these tests should be visible.

Key Files and their Responsibilities:

  1. ./src/scripts/web3Storage.js:
  • Handles the uploading of files and folders to Web3.Storage.
  • Generates decentralized QR codes for uploaded content.
  1. ./src/scripts/qrHandler.js:
  • Responsible for creating QR codes.
  1. ./src/scripts/utils.js:
  • Contains utility functions such as loaders, progress updaters, and QR code color handlers.

For development setup and contribution guide, check the main README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions