<commit_before>jasmine-where
=============

__IN PROGRESS__

Attempt to add where() clause to Jasmine, similar to Cucumber scenario-outline 
or Spock example clauses.


justify
-------

Easier to modify this
    
    it('description', function () {
    
      where(function(){/* 
        a  |  b  |  c
        1  |  2  |  2
        4  |  3  |  4
        6  |  6  |  6
       */
       expect(Math.max(a, b)).toBe(Number(c));
      });
      
    });

than this:

    it('description', function () {
    
      [[1, 2, 2],
       [4, 3, 4],
       [6, 6, 6]].forEach(function(row, r, rows) {
       
        var a = row[0], b = row[1], c = row[2];
        
        expect(Math.max(a, b)).toBe(Number(c));
      });
      
    });

    
details
-------

[24 OCT 2013]
Current impl runs in both jasmine 1.3.1 and jasmine 2.0.0-rc3.

Using testemjs to drive tests in multiple browsers for jasmine-2.0.0 and 
jasmine-node which uses jasmine 1.3.1 internally.

Entire data-table with pass/fail messages is printed to the console only if an 
expectation fails.  Reporter messages in browser still less than optimal.

A failed expectation will appear in your console as:

     incorrect data
     [a | b | c] : 
     [1 | 1 | 1] (Passed)
     [1 | 2 | x] (Expected 2 to be NaN.)
     [4 | 2 | 4] (Passed)
     [4 | 8 | 8] (Passed)

     
TODO<commit_msg>mentions to <NAME> (mstring) and <NAME> (testem)<commit_after>jasmine-where
=============

__IN PROGRESS__

Attempt to add where() clause to Jasmine, similar to Cucumber scenario-outline 
or Spock example clauses.


justify
-------

Easier to modify this
    
    it('description', function () {
    
      where(function(){/* 
        a  |  b  |  c
        1  |  2  |  2
        4  |  3  |  4
        6  |  6  |  6
       */
       expect(Math.max(a, b)).toBe(Number(c));
      });
      
    });

than this:

    it('description', function () {
    
      [[1, 2, 2],
       [4, 3, 4],
       [6, 6, 6]].forEach(function(row, r, rows) {
       
        var a = row[0], b = row[1], c = row[2];
        
        expect(Math.max(a, b)).toBe(Number(c));
      });
      
    });

    
details
-------

[24 OCT 2013]

Borrowing from rjrodger's mstring, <code>where()</code> accepts a function and 
inspects its string value, converting the commented data-table into an array of 
values, and using the labels as variable symbols in a new Function().

Current impl runs in both jasmine 1.3.1 and jasmine 2.0.0-rc3.

Using jasmine-node which uses jasmine 1.3.1 internally.

    jasmine-node --verbose ./suite.spec.js
    
Using testemjs to drive tests in multiple browsers for jasmine-2.0.0 (see how to
[hack testem for jasmine 2](https://github.com/dfkaye/testem-jasmine2), as well 
as jasmine-node.

    testem -l jasmine-node

Entire data-table with pass/fail messages is printed to the console only if an 
expectation fails.  Reporter messages in browser still less than optimal.

A failed expectation will appear in your console as:

     incorrect data
     [a | b | c] : 
     [1 | 1 | 1] (Passed)
     [1 | 2 | x] (Expected 2 to be NaN.)
     [4 | 2 | 4] (Passed)
     [4 | 8 | 8] (Passed)

     
TODO
{'fraction_non_alphanumeric': 0.13428571428571429, 'fraction_numerical': 0.03365079365079365, 'mean_word_length': 2.0503388189738625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 1, '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': '1580622', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1076, 'n_words': 362}