code: function matchesState(state, desiredState) {
    if (desiredState === 'all') {
      return true;
    }
    if (desiredState[0] === '!') {
      return state !== desiredState.substring(1);
    }
    return state === desiredState;
  }
docs: TODO: coverage istanbul ignore next