mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
list_render: Error if opts are missing.
The check here was too late, and it should have given a blueslip error. We obviously don't expect these errors at runtime; this is a convenience for developers creating new widgets.
This commit is contained in:
@@ -453,3 +453,13 @@ run_test('clear_event_handlers', () => {
|
||||
assert.equal(scroll_container.cleared, true);
|
||||
assert.equal(filter_element.cleared, true);
|
||||
});
|
||||
|
||||
run_test('errors', () => {
|
||||
// We don't care about actual data for this test.
|
||||
const list = 'stub';
|
||||
const container = 'stub';
|
||||
|
||||
blueslip.expect('error', 'Need opts to create widget.');
|
||||
list_render.create(container, list);
|
||||
blueslip.reset();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user