<commit_before>
describe("cbd.admin.CartoStyles", function() {

  var table;
  beforeEach(function() {
    table_polygons  = new cdb.admin.CartoDBTableMetadata({ name: 'test_table', geometry_types: ['st_polygon'] });
    table_polylines = new cdb.admin.CartoDBTableMetadata({ name: 'test_table', geometry_types: ['st_multilinestring'] });
  });

  describe("simple polygon generation", function() {
    it("should return valid css", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'line-width': 1,
        'polygon-opacity': 0.7,
        'line-opacity':1
      }, function(style) { css = style; });

      expect(css.indexOf('#test_table') != -1).toEqual(true);
      expect(css.indexOf('polygon-fill: #FF6600;') != -1).toEqual(true);
      expect(css.indexOf('line-opacity: 1;') != -1).toEqual(true);
    });


    it("should quota text-name entries", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'text-name': 'test'
      }, function(style) { css = style; });

      expect(css.indexOf("'test'") != -1).toEqual(true);
    });

    it("should remove text properies if the font is none", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'text-name': 'None',
        'text-face-name': 'jajaja'
      }, function(style) { css = style; });
      expect(css.indexOf("text-name") == -1).toEqual(true);
      expect(css.indexOf("text-face-name") == -1).toEqual(true);
      expect(css.indexOf("polygon-fill") != -1).toEqual(true);

    });

  });


  describe("simple polyline generation", function() {
    it("should return valid css", function() {
      var css;
      simple_polygon_generator(table_polylines, {
        'line-color': '#FFFFFF',
        'line-width': 1,
        'line-opacity':1
      }, function(style) { css = style; });

      expect(css.indexOf('#test_table') != -1).toEqual(true);
      expect(css.indexOf('polygon-fill') == -1).toEqual(true);<commit_msg>fixed tests<commit_after>
describe("cbd.admin.CartoStyles", function() {

  var table;
  beforeEach(function() {
    table_polygons  = new cdb.admin.CartoDBTableMetadata({ name: 'test_table', geometry_types: ['st_polygon'] });
    table_polylines = new cdb.admin.CartoDBTableMetadata({ name: 'test_table', geometry_types: ['st_multilinestring'] });
  });

  describe("simple polygon generation", function() {
    it("should return valid css", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'line-width': 1,
        'polygon-opacity': 0.7,
        'line-opacity':1
      }, function(style) { css = style; });

      expect(css.indexOf('#test_table') != -1).toEqual(true);
      expect(css.indexOf('polygon-fill: #FF6600;') != -1).toEqual(true);
      expect(css.indexOf('line-opacity: 1;') != -1).toEqual(true);
    });


    it("should quota text-name entries", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'text-name': 'test'
      }, function(style) { css = style; });

      expect(css.indexOf("[test]") != -1).toEqual(true);
    });

    it("should remove text properies if the font is none", function() {
      var css;
      simple_polygon_generator(table_polygons, {
        'polygon-fill': '#FF6600',
        'line-color': '#FFFFFF',
        'text-name': 'None',
        'text-face-name': 'jajaja'
      }, function(style) { css = style; });
      expect(css.indexOf("text-name") == -1).toEqual(true);
      expect(css.indexOf("text-face-name") == -1).toEqual(true);
      expect(css.indexOf("polygon-fill") != -1).toEqual(true);

    });

  });


  describe("simple polyline generation", function() {
    it("should return valid css", function() {
      var css;
      simple_polygon_generator(table_polylines, {
        'line-color': '#FFFFFF',
        'line-width': 1,
        'line-opacity':1
      }, function(style) { css = style; });

      expect(css.indexOf('#test_table') != -1).toEqual(true);
      expect(css.indexOf('polygon-fill') == -1).toEqual(true);
{'fraction_non_alphanumeric': 0.18592964824120603, 'fraction_numerical': 0.014618547281863865, 'mean_word_length': 3.0848880597014925, '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': '2391899', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1425, 'n_words': 250}