<commit_before>require("./spec_helper.js");

describe("Jbob html", function() {
  
  describe("all html tags", function() {
    it("a giant integration test for all html tags, so we see what we're allowing.", function(){
      _ = {}
      Jbob.htmlTags(_)
      
      expect(_.html(
               _.head(
                 _.meta(), _.script(), _.title(), _.link()
               ),
               _.body(
                 _.div(), _.p(), _.span(), _.a(), _.img(),
                 _.br(), _.hr(),
                 _.table(
                   _.thead(_.tr(_.th())),
                   _.tbody(_.tr(_.td()))
                 ),
                 _.ul(_.li(), _.ol()),
                 _.dl(), _.dt(), _.dd(),
                 _.h1(), _.h2(), _.h3(), _.h4(), _.h5(), _.h6(), _.h7(),
                 _.form(
                   _.fieldset(
                     _.label(),
                     _.input(),
                     _.textarea(),
                     _.button()
                   )
                 )
               )
             )).
     toEqual("<html>\n" +
               "<head>\n" +
                 "<meta/>\n<script></script>\n<title/>\n<link/>\n" +
               "</head>\n" +
               "<body>\n" +
                 "<div/>\n<p/>\n<span/>\n<a/>\n<img/>\n" +
                 "<br/>\n<hr/>\n" +
                 "<table>\n" +
                   "<thead>\n<tr>\n<th/>\n</tr>\n</thead>\n" +
                   "<tbody>\n<tr>\n<td/>\n</tr>\n</tbody>\n" +
                 "</table>\n" +
                 "<ul>\n<li/>\n<ol/>\n</ul>\n" +
                 "<dl/>\n<dt/>\n<dd/>\n" +
                 "<h1/>\n<h2/>\n<h3/>\n<h4/>\n<h5/>\n<h6/>\n<h7/>\n" +
                 "<form>\n" +
                   "<fieldset>\n" +
                     "<label/>\n" +
                     "<input/>\n" +
                     "<textarea></textarea>\n" + //I'm not self-closing
                     "<button/>\n" +
                   "</fieldset>\n" +
                 "</form>\n" +
               "</body>\n" +
             "</html>\n");
    });
  });
  
});
<commit_msg>making sure class works, just because<commit_after>require("./spec_helper.js");

describe("Jbob html", function() {
  
  describe("all html tags", function() {
    it("a giant integration test for all html tags, so we see what we're allowing.", function(){
      _ = {}
      Jbob.htmlTags(_)
      
      expect(_.html(
               _.head(
                 _.meta(), _.script(), _.title(), _.link()
               ),
               _.body(
                 _.div(), _.p(), _.span(), _.a(), _.img(),
                 _.br(), _.hr(),
                 _.table(
                   _.thead(_.tr(_.th())),
                   _.tbody(_.tr(_.td()))
                 ),
                 _.ul(_.li(), _.ol()),
                 _.dl(), _.dt(), _.dd(),
                 _.h1(), _.h2(), _.h3(), _.h4(), _.h5(), _.h6(), _.h7(),
                 _.form(
                   _.fieldset(
                     _.label(),
                     _.input(),
                     _.textarea(),
                     _.button()
                   )
                 )
               )
             )).
     toEqual("<html>\n" +
               "<head>\n" +
                 "<meta/>\n<script></script>\n<title/>\n<link/>\n" +
               "</head>\n" +
               "<body>\n" +
                 "<div/>\n<p/>\n<span/>\n<a/>\n<img/>\n" +
                 "<br/>\n<hr/>\n" +
                 "<table>\n" +
                   "<thead>\n<tr>\n<th/>\n</tr>\n</thead>\n" +
                   "<tbody>\n<tr>\n<td/>\n</tr>\n</tbody>\n" +
                 "</table>\n" +
                 "<ul>\n<li/>\n<ol/>\n</ul>\n" +
                 "<dl/>\n<dt/>\n<dd/>\n" +
                 "<h1/>\n<h2/>\n<h3/>\n<h4/>\n<h5/>\n<h6/>\n<h7/>\n" +
                 "<form>\n" +
                   "<fieldset>\n" +
                     "<label/>\n" +
                     "<input/>\n" +
                     "<textarea></textarea>\n" + //I'm not self-closing
                     "<button/>\n" +
                   "</fieldset>\n" +
                 "</form>\n" +
               "</body>\n" +
             "</html>\n");
    });
  });
  
  describe("the class attribute", function() {
    it("can be used", function(){
      _ = {}
      Jbob.htmlTags(_)
      
      expect(_.div({class:"huge", width:"100%"})).
     toEqual("<div class=\"huge\" width=\"100%\"/>\n")
    })
  })
  
});

{'fraction_non_alphanumeric': 0.22911478378990266, 'fraction_numerical': 0.007697532261716097, 'mean_word_length': 0.9075993091537133, 'pattern_counts': {'":': 0, '<': 110, '<?xml version=': 0, '>': 110, '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': '4287634', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1369, 'n_words': 191}