Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions example/__tests__/rive.harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ describe('RiveFile Loading', () => {
expect(file).toBeDefined();
expect(file.artboardNames.length).toBeGreaterThan(0);
});

it('fromURL with invalid URL throws descriptive error', async () => {
try {
await RiveFileFactory.fromURL(
'https://cdn.rive.app/nonexistent/invalid.riv',
undefined
);
expect(true).toBe(false);
} catch (e) {
expect(e).toBeDefined();
const msg = e instanceof Error ? e.message : String(e);
expect(msg.length).toBeGreaterThan(0);
}
});
});

describe('ViewModel', () => {
Expand Down
1 change: 1 addition & 0 deletions example/src/tests/TestsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default function TestsPage() {
setTestStates((prev) => new Map(prev).set(key, { status: 'passed' }));
} catch (e) {
const errorMessage = e instanceof Error ? e.message : String(e);
console.error(`[TEST FAIL] ${suiteName} > ${test.name}:`, errorMessage, e);
cleanupRenderedElement();
setTestStates((prev) =>
new Map(prev).set(key, {
Expand Down
Loading