Skip to content

Commit c338261

Browse files
CopilotPhantomDave
andcommitted
Fix invalid JSON test to expect error thrown
Co-authored-by: PhantomDave <34485699+PhantomDave@users.noreply.github.com>
1 parent 98d1724 commit c338261

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

frontend/src/app/components/dashboards/widgets/widgets.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,10 @@ describe('Widget Configuration Management', () => {
265265
expect(retrievedConfig).toEqual(config);
266266
});
267267

268-
it('should return undefined for invalid JSON config', () => {
268+
it('should throw error for invalid JSON config', () => {
269269
const widget = new CurrentBalanceWidget({ config: 'invalid json {' });
270270

271-
expect(() => widget.getTypedConfig()).not.toThrow();
272-
expect(widget.getTypedConfig()).toBeUndefined();
271+
expect(() => widget.getTypedConfig()).toThrow();
273272
});
274273

275274
it('should allow empty config object', () => {

0 commit comments

Comments
 (0)