testSelectionState() {
    const node = dom.getElement('demoSelectionMenuButton');
    selectionMenuButton.decorate(node);

    const checkbox = dom.getElement('demoCheckbox');
    assertFalse(
        'Checkbox must be unchecked (i.e. unselected)', checkbox.checked);

    selectionMenuButton.setSelectionState(
        SelectionMenuButton.SelectionState.ALL);
    assertTrue(
        'Checkbox should be checked when selecting all', checkbox.checked);
    assertEquals(
        'selectionState should be ALL', selectionMenuButton.getSelectionState(),
        SelectionMenuButton.SelectionState.ALL);

    selectionMenuButton.setSelectionState(
        SelectionMenuButton.SelectionState.NONE);
    assertFalse(
        'Checkbox should be checked when selecting all', checkbox.checked);
    assertEquals(
        'selectionState should be NONE',
        selectionMenuButton.getSelectionState(),
        SelectionMenuButton.SelectionState.NONE);

    selectionMenuButton.setSelectionState(
        SelectionMenuButton.SelectionState.SOME);
    assertTrue(
        'Checkbox should be checked when selecting all', checkbox.checked);
    assertEquals(
        'selectionState should be SOME',
        selectionMenuButton.getSelectionState(),
        SelectionMenuButton.SelectionState.SOME);
  }
Tests that set/getSelectionState correctly changes the state
     @suppress {strictMissingProperties} suppression added to enable type
     checking