<commit_before>(function() {

  module('attrs');

  test('data-attrs', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-attrs=\'{"title": "title"}\'></i></p>';
      },
      model: new Backbone.Model({title: 'x'})
    }).render();
    strictEqual(view.$('i').attr('title'), 'x');
    view.model.set({title: 'y'});
    strictEqual(view.$('i').attr('title'), 'y');
  });

  test('data-props', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><input type="checkbox" data-props=\'{"checked": "checked"}\'></p>';
      },
      model: new Backbone.Model({checked: true})
    }).render();
    ok(view.$('input').prop('checked'));
    view.model.set({checked: false});
    ok(!view.$('input').prop('checked'));
  });

  test('data-css', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-css=\'{"color": "color"}\'></i></p>';
      },
      model: new Backbone.Model({color: 'blue'})
    }).render();
    strictEqual(view.$('i').css('color'), 'blue');
    view.model.set({color: 'green'});
    strictEqual(view.$('i').css('color'), 'green');
  });

  test('multiple attrs', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-css=\'{"color": "color", "background": "background"}\'></i></p>';
      },
      model: new Backbone.Model({color: 'blue', background: 'white'})
    }).render();
    view.model.set({color: 'red', background: 'black'});
    strictEqual(view.$('i').css('color'), 'red');
    strictEqual(view.$('i').css('background'), 'black');
  });

  test('missing model', 0, function() {
    new Quilt.View({
      template: function() {
        return '<p><i data-attrs=\'{"title": "title"}\'></i></p>';
      }
    }).render();
  });

})();<commit_msg>Fix tests for firefox (reports color differently).<commit_after>(function() {

  module('attrs');

  test('data-attrs', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-attrs=\'{"title": "title"}\'></i></p>';
      },
      model: new Backbone.Model({title: 'x'})
    }).render();
    strictEqual(view.$('i').attr('title'), 'x');
    view.model.set({title: 'y'});
    strictEqual(view.$('i').attr('title'), 'y');
  });

  test('data-props', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><input type="checkbox" data-props=\'{"checked": "checked"}\'></p>';
      },
      model: new Backbone.Model({checked: true})
    }).render();
    ok(view.$('input').prop('checked'));
    view.model.set({checked: false});
    ok(!view.$('input').prop('checked'));
  });

  test('data-css', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-css=\'{"display": "display"}\'></i></p>';
      },
      model: new Backbone.Model({display: 'block'})
    }).render();
    strictEqual(view.$('i').css('display'), 'block');
    view.model.set({display: 'inline'});
    strictEqual(view.$('i').css('display'), 'inline');
  });

  test('multiple attrs', function() {
    var view = new Quilt.View({
      template: function() {
        return '<p><i data-css=\'{"display": "display", "position": "position"}\'></i></p>';
      },
      model: new Backbone.Model({display: 'block', position: 'absolute'})
    }).render();
    view.model.set({display: 'inline', position: 'relative'});
    strictEqual(view.$('i').css('display'), 'inline');
    strictEqual(view.$('i').css('position'), 'relative');
  });

  test('missing model', 0, function() {
    new Quilt.View({
      template: function() {
        return '<p><i data-attrs=\'{"title": "title"}\'></i></p>';
      }
    }).render();
  });

})();
{'fraction_non_alphanumeric': 0.26343658988615304, 'fraction_numerical': 0.0005295207836907599, 'mean_word_length': 3.216517857142857, 'pattern_counts': {'":': 12, '<': 41, '<?xml version=': 0, '>': 41, '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': '6148601', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1220, 'n_words': 232}