<commit_before>var $ = require('jquery');
var _ = require('underscore');
var util = require('cdb.core.util');
var WindshaftClient = require('../../../src/windshaft/client');
var Request = require('../../../src/windshaft/request');

var LZMA = require('lzma');

describe('windshaft/client', function () {
  fdescribe('instantiateMap', function () {
    beforeEach(function () {
      spyOn($, 'ajax').and.callFake(function (params) {
        this.ajaxParams = params;
      }.bind(this));

      spyOn(util, 'uniqueCallbackName').and.callFake(function () { return 'callbackName'; });

      this.client = new WindshaftClient({
        urlTemplate: 'https://{user}.carto.com:443',
        userName: 'rambo'
      });
    });

    it('should trigger a GET request to instantiate a map', function () {
      var request = new Request({ some: 'json that must be encoded' }, {}, {});
      this.client.instantiateMap(request);<commit_msg>Remove fdescribe<commit_after>var $ = require('jquery');
var _ = require('underscore');
var util = require('cdb.core.util');
var WindshaftClient = require('../../../src/windshaft/client');
var Request = require('../../../src/windshaft/request');

var LZMA = require('lzma');

describe('windshaft/client', function () {
  describe('instantiateMap', function () {
    beforeEach(function () {
      spyOn($, 'ajax').and.callFake(function (params) {
        this.ajaxParams = params;
      }.bind(this));

      spyOn(util, 'uniqueCallbackName').and.callFake(function () { return 'callbackName'; });

      this.client = new WindshaftClient({
        urlTemplate: 'https://{user}.carto.com:443',
        userName: 'rambo'
      });
    });

    it('should trigger a GET request to instantiate a map', function () {
      var request = new Request({ some: 'json that must be encoded' }, {}, {});
      this.client.instantiateMap(request);
{'fraction_non_alphanumeric': 0.18542336548767416, 'fraction_numerical': 0.003215434083601286, 'mean_word_length': 3.4452380952380954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2118478', 'n_tokens_mistral': 578, 'n_tokens_neox': 555, 'n_words': 118}