src/tests/extras/filters/event_labeler_builder_test.js
/**
 * Verifies that if an event hit has an existing label, the range bounds 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 range bounds 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 range bounds labeler will append the new label to the existing one if the append feature is specified .
function testRangeBoundsLabeler_WithExistingLabel_WithAppend() {
  var hit = analytics.testing.Hits.createEventHit(100);
  hit.getParameters().set(analytics.Parameters.EVENT_LABEL, 'asdf');
  var labeler = new analytics.filters.EventLabelerBuilder().
      rangeBounds([10, 50]).
      appendToExistingLabel().
      build();
  labeler(hit);
  assertEquals('asdf - 51+',
      hit.getParameters().get(analytics.Parameters.EVENT_LABEL));
}
function testRangeBoundsLabeler_WithExistingLabel_WithAppend ( ) { var hit = analytics . testing . Hits . createEventHit ( 100 ) ; hit . getParameters ( ) . set ( analytics . Parameters . EVENT_LABEL , 'asdf' ) ; var labeler = new analytics . filters . EventLabelerBuilder ( ) . rangeBounds ( [ 10 , 50 ] ) . appendToExistingLabel ( ) . build ( ) ; labeler ( hit ) ; assertEquals ( 'asdf - 51+' , hit . getParameters ( ) . get ( analytics . Parameters . EVENT_LABEL ) ) ; }
Verifies that if an event hit has an existing label, the range bounds 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 range bounds labeler will append the new label to the existing one if the append feature is specified .