Skip to content

Add browser and edge runtime compatibility tests #93

Description

@Lakes41

Difficulty: Advanced

Type: Test

Summary

Add runtime compatibility tests for browser-like and edge-like environments so the universal SDK claim remains reliable.

Current Behaviour

The SDK is documented as working in Node.js, browsers, and Edge runtimes, but the test suite mainly runs in a Node-style environment.

Expected Behaviour

CI should verify that supported SDK entry points do not rely on Node-only globals in browser and edge runtime scenarios.

Suggested Implementation

Add Vitest projects or lightweight compatibility test bundles for Node, jsdom or browser-like runtime, and edge-like runtime. Verify imports, client construction with custom fetch, service calls with mocked transport, and address utilities.

Files or Areas Likely Affected

  • vitest.config.ts
  • tests/compat/
  • package.json
  • tsup.config.ts
  • .github/workflows/ci.yml
  • README.md

Acceptance Criteria

  • Compatibility tests run in a Node runtime
  • Compatibility tests run in a browser-like runtime
  • Compatibility tests cover a custom fetch transport
  • SDK imports do not require Node-only globals in browser-like tests
  • Build output remains compatible with declared package exports
  • README documents tested runtime support

Additional Notes

This should not duplicate package export smoke tests. It should focus on runtime behaviour after imports succeed.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions