testMaxMatches() {
    const ds = new MockDS();
    const rend = new TestRend();
    /** @suppress {checkTypes} suppression added to enable type checking */
    const select = new MockSelect();
    const ac = new AutoComplete(ds, rend, select);

    ac.setMaxMatches(2);
    ac.setToken('the');
    assertEquals(2, rend.getRenderedRows().length);
    ac.setToken('');

    ac.setMaxMatches(3);
    ac.setToken('the');
    assertEquals(3, rend.getRenderedRows().length);
    ac.setToken('');

    ac.setMaxMatches(1000);
    ac.setToken('the');
    assertEquals(4, rend.getRenderedRows().length);
    ac.setToken('');
  }
Make sure results are truncated (or not) by setMaxMatches.