• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ProjectOpenSea / opensea-js / 18514730422
89%
master: 30%

Build:
Build:
LAST BUILD BRANCH: renovate/eslint-monorepo
DEFAULT BRANCH: master
Ran 15 Oct 2025 01:19AM UTC
Jobs 1
Files 55
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Oct 2025 01:18AM UTC coverage: 83.839% (+33.8%) from 50.0%
18514730422

push

github

web-flow
refactor: major SDK/API restructure, improve test coverage (#1783)

* test: improve test coverage from 77% to 87.5%

## Summary
- Added 229 comprehensive unit tests across API clients and SDK managers
- Improved overall line coverage from ~77% to 87.5%
- Refactored monolithic files into focused modules following single-responsibility principle

## Test Coverage Improvements

### API Clients (src/api)
- collections.ts: 29% → 100% (+71%)
- listings.ts: 33% → 100% (+67%)
- nfts.ts: 40% → 100% (+60%)
- offers.ts: 35% → 100% (+65%)
- Overall src/api: 84.82% coverage

### SDK Managers (src/sdk)
- orders.ts: 13.75% → 97.5% (+83.75%)
- fulfillment.ts: 16.43% → 87.67% (+71.24%)
- Overall src/sdk: 70.44% coverage

### Utils (src/utils)
- Overall src/utils: 99.47% coverage

## New Test Files (229 tests)
- test/api/collections.spec.ts (19 tests)
- test/api/listings.spec.ts (27 tests)
- test/api/nfts.spec.ts (42 tests)
- test/api/offers.spec.ts (47 tests)
- test/sdk/ordersManager.spec.ts (48 tests)
- test/sdk/fulfillmentManager.spec.ts (46 tests)

## Refactoring (No Breaking Changes)

### API Module Split
- Extracted specialized API clients from monolithic api.ts
- Created: accounts.ts, collections.ts, listings.ts, nfts.ts, offers.ts, orders.ts
- All exports preserved via delegation pattern

### SDK Module Split
- Extracted manager classes from monolithic sdk.ts
- Created: assets.ts, cancellation.ts, fulfillment.ts, orders.ts, tokens.ts
- All public methods preserved via delegation

### Utils Module Split
- Extracted focused utilities from monolithic utils.ts
- Created: chain.ts, converters.ts, fees.ts, protocol.ts
- All exports re-exported from utils.ts for backward compatibility

### Shared Utilities
- Added getSeaportInstance() to eliminate duplicate implementations
- Added getSeaportVersion() for centralized version mapping

## Testing Approach
- Pure unit tests with comprehensive mocking
- No external dependencies (API/blockchain calls)
- Edge case coverage (... (continued)

360 of 555 branches covered (64.86%)

Branch coverage included in aggregate %.

2039 of 2303 new or added lines in 31 files covered. (88.54%)

2706 of 3102 relevant lines covered (87.23%)

2.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
110
31.51
src/sdk/assets.ts
50
31.25
src/sdk/cancellation.ts
18
56.83
7.06% src/api/api.ts
16
30.43
src/sdk/tokens.ts
11
43.14
21.69% src/sdk.ts
10
66.67
src/api/orders.ts
9
95.81
test/api/offers.spec.ts
8
95.98
test/sdk/fulfillmentManager.spec.ts
7
96.92
test/api/nfts.spec.ts
6
96.13
test/api/listings.spec.ts
4
97.06
test/api/collections.spec.ts
4
97.98
test/sdk/ordersManager.spec.ts
3
96.73
src/utils/chain.ts
2
70.0
src/api/accounts.ts
2
86.87
src/sdk/fulfillment.ts
2
87.16
src/sdk/orders.ts
2
97.73
src/utils/protocol.ts
Jobs
ID Job ID Ran Files Coverage
1 18514730422.1 15 Oct 2025 01:19AM UTC 55
83.84
GitHub Action Run
Source Files on build 18514730422
  • Tree
  • List 55
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2ad82674 on github
  • Prev Build on main (#18512564758)
  • Next Build on main (#18514892597)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc