<commit_before>var global = global ||  window;
var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var expect = chai.expect;
var should = chai.should();
chai.use(sinonChai);
var jQuery = global.jQuery;
jQuery = jQuery || require('jquery-browserify');
var $ = jQuery;
var _ = global._;
_ = _ || require('underscore');
var Backbone = global.Backbone;
Backbone = Backbone ||  require('backbone');
Backbone.$ = $
var File = require('../../main/javascript/Backbone.File.Sync.js').File;
Backbone = _.extend(Backbone, File);
var when = require('when');
var testInBrowserOnly = require('./testInBrowserOnly.js');
var AudioSource = require('../../main/javascript/AudioSource.js');

describe('AudioSource', function(){
  testInBrowserOnly(this)(function(){
    beforeEach(function(done){
      $('#fixtures').html('<div id="audio-source-container"></div>');
      this.instance = new AudioSource({el: $('#fixtures #audio-source-container')});
      done();
    });
    afterEach(function(done){
      this.instance.remove();
      $('#fixtures').html('');
      done();
    });
    it('should exist', function(done){
      expect(AudioSource).to.exist;
      done();
    });
    it('should be a Backbone.View', function(done){
      this.instance.should.be.an.instanceof(Backbone.View);
      done();
    });
  });
});<commit_msg>Adds failing AudioSource.render test.<commit_after>var global = global ||  window;
var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var expect = chai.expect;
var should = chai.should();
chai.use(sinonChai);
var jQuery = global.jQuery;
jQuery = jQuery || require('jquery-browserify');
var $ = jQuery;
var _ = global._;
_ = _ || require('underscore');
var Backbone = global.Backbone;
Backbone = Backbone ||  require('backbone');
Backbone.$ = $
var File = require('../../main/javascript/Backbone.File.Sync.js').File;
Backbone = _.extend(Backbone, File);
var when = require('when');
var testInBrowserOnly = require('./testInBrowserOnly.js');
var AudioSource = require('../../main/javascript/AudioSource.js');

describe('AudioSource', function(){
  testInBrowserOnly(this)(function(){
    beforeEach(function(done){
      $('#fixtures').html('<div id="audio-source-container"></div>');
      this.instance = new AudioSource({el: $('#fixtures #audio-source-container')});
      done();
    });
    afterEach(function(done){
      this.instance.remove();
      $('#fixtures').html('');
      done();
    });
    it('should exist', function(done){
      expect(AudioSource).to.exist;
      done();
    });
    it('should be a Backbone.View', function(done){
      this.instance.should.be.an.instanceof(Backbone.View);
      done();
    });
    describe('#render', function(){
      it('should exist', function(done){
        expect(this.instance.render).to.exist;
        done();
      });
      it('should be a Function', function(done){
        this.instance.render.should.be.an.instanceof(Function);
        done();
      });
      it('should return the view instance ("Be fluent!")', function(done){
        this.instance.render().should.deep.equal(this.instance);
        done();
      });
      it('should render something into the fixtures div', function(done){
        this.instance.render();
        $('#fixtures #audio-source-container').html().should.not.equal('');
        done();
      });
    }); 
  });
});
{'fraction_non_alphanumeric': 0.19264448336252188, 'fraction_numerical': 0.0, 'mean_word_length': 3.6689373297002725, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '109185', 'n_tokens_mistral': 1025, 'n_tokens_neox': 1024, 'n_words': 201}