diff --git a/frontend_tests/node_tests/list_render.js b/frontend_tests/node_tests/list_render.js index b5233e204e..917001a8af 100644 --- a/frontend_tests/node_tests/list_render.js +++ b/frontend_tests/node_tests/list_render.js @@ -192,7 +192,7 @@ run_test('filtering', () => { 'fence', 'grape', ]; - let opts = { + const opts = { filter: { element: search_input, predicate: (item, value) => { @@ -203,7 +203,7 @@ run_test('filtering', () => { }; container.html = (html) => { assert.equal(html, ''); }; - let widget = list_render.create(container, list, opts); + const widget = list_render.create(container, list, opts); let expected_html = '
apple
' + @@ -240,15 +240,21 @@ run_test('filtering', () => { '
gary
' + '
giraffe
'; assert.deepEqual(container.appended_data.html(), expected_html); +}); + +run_test('no filtering', () => { + const container = make_container(); + make_scroll_container(container); + container.html = () => {}; // Opts does not require a filter key. - opts = { + const opts = { modifier: (item) => div(item), }; - widget = list_render.create(container, ['apple', 'banana'], opts); + const widget = list_render.create(container, ['apple', 'banana'], opts); widget.render(); - expected_html = + const expected_html = '
apple
' + '
banana
'; assert.deepEqual(container.appended_data.html(), expected_html);