Skip to content

test: add async API coverage tests#258

Merged
mfazekas merged 3 commits into
feat/rive-ios-experimentalfrom
test/async-api-coverage
May 18, 2026
Merged

test: add async API coverage tests#258
mfazekas merged 3 commits into
feat/rive-ios-experimentalfrom
test/async-api-coverage

Conversation

@mfazekas
Copy link
Copy Markdown
Collaborator

Summary

Adds 31 harness tests for the non-deprecated async API that previously had zero test coverage. Existing tests only exercise the deprecated sync methods (.value, viewModelByName, createInstanceByName, etc.) — this fills the gap for the intended async replacements.

What's covered

  • createDefaultInstanceAsync, createInstanceByNameAsync, createBlankInstanceAsync
  • defaultArtboardViewModelAsync, getArtboardCountAsync, getArtboardNamesAsync
  • getPropertiesAsync, getPropertyCountAsync, getInstanceCountAsync
  • getValueAsync() + set() round-trip for all 5 property types (number, string, boolean, color, enum)
  • viewModelAsync for nested ViewModel access
  • Async list operations: getLengthAsync, getInstanceAtAsync, addInstanceAsync, removeInstanceAtAsync, swapAsync

Test plan

  • yarn test:harness:ios -- __tests__/async-api.harness.ts — 31/31 pass
  • Full suite yarn test:harness:ios — 136 pass (no regressions)

mfazekas added 3 commits May 14, 2026 13:15
Tests for the non-deprecated async API surface that previously had zero
test coverage: getValueAsync, createDefaultInstanceAsync,
createInstanceByNameAsync, createBlankInstanceAsync,
defaultArtboardViewModelAsync, getArtboardCountAsync,
getPropertiesAsync, and async list operations.
@mfazekas mfazekas merged commit 80b8072 into feat/rive-ios-experimental May 18, 2026
21 of 22 checks passed
@mfazekas mfazekas deleted the test/async-api-coverage branch May 18, 2026 09:44
mfazekas added a commit that referenced this pull request May 19, 2026
## Summary

Adds 31 harness tests for the non-deprecated async API that previously
had zero test coverage. Existing tests only exercise the deprecated sync
methods (`.value`, `viewModelByName`, `createInstanceByName`, etc.) —
this fills the gap for the intended async replacements.

## What's covered

- `createDefaultInstanceAsync`, `createInstanceByNameAsync`,
`createBlankInstanceAsync`
- `defaultArtboardViewModelAsync`, `getArtboardCountAsync`,
`getArtboardNamesAsync`
- `getPropertiesAsync`, `getPropertyCountAsync`, `getInstanceCountAsync`
- `getValueAsync()` + `set()` round-trip for all 5 property types
(number, string, boolean, color, enum)
- `viewModelAsync` for nested ViewModel access
- Async list operations: `getLengthAsync`, `getInstanceAtAsync`,
`addInstanceAsync`, `removeInstanceAtAsync`, `swapAsync`

## Test plan

- [x] `yarn test:harness:ios -- __tests__/async-api.harness.ts` — 31/31
pass
- [x] Full suite `yarn test:harness:ios` — 136 pass (no regressions)
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.

1 participant