src/tests/service_channel_test.js
/**
 * Guarantees that the service channel buffers hits until the
 * settings object becomes ready, AND drains those hits into the
 * ready-and-waiting system after settings became ready.
 */
Guarantees that the service channel buffers hits until the
settings object becomes ready, AND drains those hits into the
ready-and-waiting system after settings became ready.
Guarantees that the service channel buffers hits until the settings object becomes ready AND drains those hits into the ready - and - waiting system after settings became ready .
function testSettingsReady_SendsDivertedHits() {
  initSettings(false, true);
  initChannel();
  channel.send(analytics.HitTypes.TRANSACTION, HIT_0);
  channel.send(analytics.HitTypes.APPVIEW, HIT_1);
  enabledChannel.assertNumHitsSent(0);
  settings.becomeReady();
  enabledChannel.assertNumHitsSent(2);
  enabledChannel.assertHitSent(HIT_0);
  enabledChannel.assertHitSent(HIT_1);
}
function testSettingsReady_SendsDivertedHits ( ) { initSettings ( false , true ) ; initChannel ( ) ; channel . send ( analytics . HitTypes . TRANSACTION , HIT_0 ) ; channel . send ( analytics . HitTypes . APPVIEW , HIT_1 ) ; enabledChannel . assertNumHitsSent ( 0 ) ; settings . becomeReady ( ) ; enabledChannel . assertNumHitsSent ( 2 ) ; enabledChannel . assertHitSent ( HIT_0 ) ; enabledChannel . assertHitSent ( HIT_1 ) ; }
Guarantees that the service channel buffers hits until the
 settings object becomes ready, AND drains those hits into the
 ready-and-waiting system after settings became ready.
Guarantees that the service channel buffers hits until the settings object becomes ready AND drains those hits into the ready - and - waiting system after settings became ready .