Skip to content

Commit 10fc540

Browse files
committed
fix: only allow snakeLizard enum on android legacy backend
1 parent 7f97043 commit 10fc540

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/__tests__/viewmodel-properties.harness.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ describe('ViewModel Properties', () => {
9999
// Most backends reject invalid enum values; the value should revert to 'cat'
100100
// Android legacy SDK accepts them (reads back 'snakeLizard')
101101
const val = enumProperty.value;
102-
expect(val === 'cat' || val === 'snakeLizard').toBe(true);
102+
if (Platform.OS === 'android' && RiveFileFactory.getBackend() === 'legacy') {
103+
expect(val === 'cat' || val === 'snakeLizard').toBe(true);
104+
} else {
105+
expect(val).toBe('cat');
106+
}
103107
});
104108

105109
it('triggerProperty can be triggered', async () => {

0 commit comments

Comments
 (0)