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

feat: added test infrastructure for SDK reliability #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

0xObsidian
Copy link

@0xObsidian 0xObsidian commented Dec 9, 2024

This PR introduces comprehensive test coverage and continuous integration checks to maintian the wallet SDK's reliability and prevent regressions:

Description

  • Position enum validation
  • createPhantom configuration handling (validates SDK initialization)
  • Script tag creation and attributes (verifies DOM manipulation)
  • URL parameter handling (confirms correct Phantom connection params)
  • Edge cases and invalid inputs (improves error handling)

Impact

  • Enables safe future iterations and feature additions
  • Prevents breaking changes in core SDK functionality
  • Maintains 100% test coverage for critical user-facing features

Testing the introduced feat

  1. To execute the test suite, run:
 yarn test
  1. To verify coverage metrics, run:
yarn test:coverage 
  1. For interactive granular testing during development, run:
yarn test:watch 

Available commands in watch mode:

  • a - run all tests
  • f - run only failed tests
  • p - filter by filename pattern
  • t - filter by test name pattern
  • Enter - trigger a test run
    Note: Tests auto-rerun on file changes
  1. To execute the introduced CI integration:

    • Create a PR targeting main
    • Check GitHub Actions
  2. To remove dev build artifacts, run:

yarn clean 

@0xObsidian 0xObsidian changed the title feat: test infrastructure for SDK reliability feat: added test infrastructure for SDK reliability Dec 9, 2024
@0xObsidian 0xObsidian force-pushed the 0xObsidian/test-infrastructure-for-SDK-reliability branch from 9aef996 to 1fa936d Compare December 9, 2024 19:26
@0xObsidian
Copy link
Author

@tian000
Hi, feel free to let me know if you have any question regarding this PR

@illuminated-shade
Copy link

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/[email protected]

View full report↗︎

This commit introduces comprehensive test coverage and continuous integration
checks to maintian the wallet SDK's reliability and prevent regressions:

Description
-----------
- Position enum validation
- createPhantom configuration handling (validates SDK initialization)
- Script tag creation and attributes (verifies DOM manipulation)
- URL parameter handling (confirms correct Phantom connection params)
- Edge cases and invalid inputs (improves error handling)

Impact
------
- Enables safe future iterations and feature additions
- Prevents breaking changes in core SDK functionality
- Maintains 100% test coverage for critical user-facing features

Testing the introduced `feat`
-----------------------------
1. To execute the test suite, run:
   ```
   yarn test
   ```
2. To verify coverage metrics, run:
  ```
  yarn test:coverage
  ```

3. For interactive granular testing during development, run:
   ```
   yarn test:watch
   ```
   Available commands in watch mode:
   - `a` - run all tests
   - `f` - run only failed tests
   - `p` - filter by filename pattern
   - `t` - filter by test name pattern
   - `Enter` - trigger a test run
  **Note**: Tests auto-rerun on file changes

4. To execute the introduced CI integration:
   - Create a PR targeting `main`
   - Check GitHub Actions

5. To remove dev build artifacts, run:
   ```
   yarn clean
   ```
@0xObsidian 0xObsidian force-pushed the 0xObsidian/test-infrastructure-for-SDK-reliability branch from 1fa936d to fe70397 Compare December 17, 2024 06:04
@0xObsidian 0xObsidian requested a review from a team as a code owner December 17, 2024 06:04
@0xObsidian
Copy link
Author

Hi @illuminated-shade
Merge conflict fixed, feel free to let me know if you have any question.

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.

2 participants