<commit_before>require([
  "jquery",
  "store",
  "ndlsearch",
  "settings",
  "mocha",
  "chai",
  "widgets/ResultWidget",
  "widgets/CurrentSearchWidget",
  "widgets/FacetWidget",
  "widgets/AdvancedSearchWidget",
  "widgets/SuggestWidget",
  "widgets/BookmarkWidget",
  "widgets/RecommenderWidget",
  "widgets/TagcloudWidget",
], function ($, store, NdlSearch, settings, mocha, chai){

  //mochaのセットアップ
  mocha.setup('bdd');
  var assert = chai.assert;
  var expect = chai.expect;
  chai.should();

  //テストケース
  describe('test', function (){
    it('is test', function (){ expect(true).to.eql(true); });
  });

  //テストの実行
  mocha.checkLeaks();
  mocha.run();
});<commit_msg>add test cases for AjaxSolr.Manager<commit_after>require([
  "jquery",
  "store",
  "ndlsearch",
  "settings",
  "mocha",
  "chai",
  "widgets/ResultWidget",
  "widgets/CurrentSearchWidget",
  "widgets/FacetWidget",
  "widgets/AdvancedSearchWidget",
  "widgets/SuggestWidget",
  "widgets/BookmarkWidget",
  "widgets/RecommenderWidget",
  "widgets/TagcloudWidget",
], function ($, store, NdlSearch, settings, mocha, chai){

  //mochaのセットアップ
  mocha.setup('bdd');
  var assert = chai.assert;
  var expect = chai.expect;
  chai.should();

  var Manager = new AjaxSolr.Manager({
                    solrUrl: settings.labs.solrUrl
  });

  //テストケース
  describe('AjaxSolr.Manager', function (){

    it('is object', function (){
      expect(Manager).to.be.a('object');
    });

    describe('#setVariantField', function (){
      var correct_case = function (){ 
	return Manager.setVariantField('__test__', "(%VALUE%)" );
      };

      it('is a method of AjaxSolr.Manager', function (){
	expect(Manager).to.have.property('setVariantField');
	expect(Manager.setVariantField).to.be.a('function');
      });

      it('return an array', function (){
	expect(correct_case()).to.be.instanceof(Array);
      });
    });

  });

  //テストの実行
  mocha.checkLeaks();
  mocha.run();
});
{'fraction_non_alphanumeric': 0.17934224049331962, 'fraction_numerical': 0.0, 'mean_word_length': 3.8074074074074074, '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': '2701155', 'n_tokens_mistral': 730, 'n_tokens_neox': 678, 'n_words': 111}