Skip to content

Commit 71f2595

Browse files
committed
test(models): increase pluginUrlsSchema coverage
1 parent f1c0b61 commit 71f2595

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/models/src/lib/plugin-config.unit.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,28 @@ describe('pluginUrlsSchema', () => {
164164
});
165165

166166
it('should throw for invalid URL', () => {
167-
expect(() => pluginUrlsSchema.parse('not-a-url')).toThrow();
167+
expect(() => pluginUrlsSchema.parse('invalid')).toThrow();
168168
});
169169

170170
it('should throw for array with invalid URL', () => {
171171
expect(() =>
172172
pluginUrlsSchema.parse(['https://example.com', 'invalid']),
173173
).toThrow();
174174
});
175+
176+
it('should throw for object with invalid URL', () => {
177+
expect(() => pluginUrlsSchema.parse({ invalid: 1 })).toThrow();
178+
});
179+
180+
it('should throw for invalid negative weight', () => {
181+
expect(() =>
182+
pluginUrlsSchema.parse({ 'https://example.com': -1 }),
183+
).toThrow();
184+
});
185+
186+
it('should throw for invalid string weight', () => {
187+
expect(() =>
188+
pluginUrlsSchema.parse({ 'https://example.com': '1' }),
189+
).toThrow();
190+
});
175191
});

0 commit comments

Comments
 (0)