<commit_before>var assert = require('assert');
var ift = require('../../library/ift');
var ParentTransport = ift.ParentTransport;
var Channel = ift.Channel;
var Exec = require('../../library/services/exec');

afterEach(function() {
  Channel.reset();
  manager.destroy();
});

it.only("facilitates multiplexed communication across origins", function(done) {
  var childStub = function(exec, ift) {
    ift.child({
      trustedOrigins: PARENT_ORIGINS
    }).ready(function(manager) {
      var channel1 = manager.channel('channel1');
      channel1.on('request', function(id, method, params) {
        channel1.respond(id, 'channel1 response');
      });

      var channel2 = manager.channel('channel2');
      channel2.on('request', function(id, method, params) {
        channel2.respond(id, 'channel2 response');
      });
    });
  };

  manager = ift.parent({
    childOrigin: CHILD_ORIGIN,
    childPath: CHILD_PATH
  });<commit_msg>Forgot to remove it.only call in tests<commit_after>var assert = require('assert');
var ift = require('../../library/ift');
var ParentTransport = ift.ParentTransport;
var Channel = ift.Channel;
var Exec = require('../../library/services/exec');

afterEach(function() {
  Channel.reset();
  manager.destroy();
});

it("facilitates multiplexed communication across origins", function(done) {
  var childStub = function(exec, ift) {
    ift.child({
      trustedOrigins: PARENT_ORIGINS
    }).ready(function(manager) {
      var channel1 = manager.channel('channel1');
      channel1.on('request', function(id, method, params) {
        channel1.respond(id, 'channel1 response');
      });

      var channel2 = manager.channel('channel2');
      channel2.on('request', function(id, method, params) {
        channel2.respond(id, 'channel2 response');
      });
    });
  };

  manager = ift.parent({
    childOrigin: CHILD_ORIGIN,
    childPath: CHILD_PATH
  });
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.010526315789473684, 'mean_word_length': 3.647921760391198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3710257', 'n_tokens_mistral': 583, 'n_tokens_neox': 571, 'n_words': 122}