<commit_before>'use strict';

var assert = require('assert');
var sinon = require('sinon');
require('../fixture/sandbox.js');

describe('XhrTransport', function() {
  it('should set http method', function() {
    var transport = new lfr.XhrTransport('http://liferay.com');
    transport.setHttpMethod('POST');
    assert.strictEqual('POST', transport.getHttpMethod(), 'Should warn when open');
  });

  it('should set http headers', function() {
    var transport = new lfr.XhrTransport('http://liferay.com');
    var headers = {
      foo: 1
    };
    transport.setHttpHeaders(headers);
    assert.strictEqual(headers, transport.getHttpHeaders(), 'Should set http headers');
  });

  it('should connection open', function(done) {<commit_msg>Adds test for store transport uri into the instance<commit_after>'use strict';

var assert = require('assert');
var sinon = require('sinon');
require('../fixture/sandbox.js');

describe('XhrTransport', function() {
  it('should set uri', function() {
    var transport = new lfr.XhrTransport('http://liferay.com');
    transport.setUri('http://liferay.com/data');
    assert.strictEqual('http://liferay.com/data', transport.getUri(), 'Should set uri');
  });

  it('should set http method', function() {
    var transport = new lfr.XhrTransport('http://liferay.com');
    transport.setHttpMethod('POST');
    assert.strictEqual('POST', transport.getHttpMethod(), 'Should warn when open');
  });

  it('should set http headers', function() {
    var transport = new lfr.XhrTransport('http://liferay.com');
    var headers = {
      foo: 1
    };
    transport.setHttpHeaders(headers);
    assert.strictEqual(headers, transport.getHttpHeaders(), 'Should set http headers');
  });

  it('should connection open', function(done) {
{'fraction_non_alphanumeric': 0.16732617297908423, 'fraction_numerical': 0.0011305822498586771, 'mean_word_length': 4.429447852760736, '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': '6026144', 'n_tokens_mistral': 514, 'n_tokens_neox': 516, 'n_words': 124}