src/tests/extras/filters/event_labeler_builder_test.js
/**
 * Verifies that if an event hit has an existing label, the powers-of-two
 * labeler will append the new label to the existing one if the append feature
 * is specified.
 */
Verifies that if an event hit has an existing label, the powers-of-two
labeler will append the new label to the existing one if the append feature
is specified.
Verifies that if an event hit has an existing label the powers - of - two labeler will append the new label to the existing one if the append feature is specified .
function testPowersOfTwoLabeler_WithExistingLabel_WithAppend() {
  var hit = analytics.testing.Hits.createEventHit(100);
  hit.getParameters().set(analytics.Parameters.EVENT_LABEL, 'asdf');
  var labeler = new analytics.filters.EventLabelerBuilder().
      powersOfTwo().
      appendToExistingLabel().
      build();
  labeler(hit);
  assertEquals('asdf - 65-128',
      hit.getParameters().get(analytics.Parameters.EVENT_LABEL));
}
function testPowersOfTwoLabeler_WithExistingLabel_WithAppend ( ) { var hit = analytics . testing . Hits . createEventHit ( 100 ) ; hit . getParameters ( ) . set ( analytics . Parameters . EVENT_LABEL , 'asdf' ) ; var labeler = new analytics . filters . EventLabelerBuilder ( ) . powersOfTwo ( ) . appendToExistingLabel ( ) . build ( ) ; labeler ( hit ) ; assertEquals ( 'asdf - 65-128' , hit . getParameters ( ) . get ( analytics . Parameters . EVENT_LABEL ) ) ; }
Verifies that if an event hit has an existing label, the powers-of-two
 labeler will append the new label to the existing one if the append feature
 is specified.
Verifies that if an event hit has an existing label the powers - of - two labeler will append the new label to the existing one if the append feature is specified .