<commit_before>'use strict';
/*jshint asi: true, browser: true */

var test = require('tape')
  , getStyleProperty =  require('..');

+function setup() {

  +function createFoo() {
    var elem = document.createElement('div')
    elem.setAttribute('class', 'foo')
    document.body.appendChild(elem)
  }()

  +function loadStyle() {
    var css = [
          '.foo {'
        , '   min-height    :  20px;'
        , '   min-width     :  200px;'
        , '   padding       :  10px;'
        , '   margin        :  10px;'
        , '   background    :  antiquewhite;'
        , '   border        :  1px solid antiquewhite;'
        , '   border-radius :  5px;'
        , ' };'
    ].join('\n');

    var head  = document.getElementsByTagName('head')[0];
    var style = document.createElement('style');

    style.type = 'text/css';

    if (style.styleSheet){
      style.styleSheet.cssText = css;
    } else {
      style.appendChild(document.createTextNode(css));
    }
    head.appendChild(style);
  }()
}()

test('get style property', function (t) {
  var foo = document.querySelector('.foo')
  
  t.equal('20px' ,  getStyleProperty(foo ,  'height')        ,  'gets height')
  t.equal('20px' ,  getStyleProperty(foo ,  'min-height')    ,  'gets min-height')
  t.equal('10px' ,  getStyleProperty(foo ,  'padding')       ,  'gets padding')
  t.equal('10px' ,  getStyleProperty(foo ,  'padding-left')  ,  'gets padding-left')
  t.equal('10px' ,  getStyleProperty(foo ,  'margin')        ,  'gets margin')
  t.equal('10px' ,  getStyleProperty(foo ,  'margin-left')   ,  'gets margin-left')
  t.equal('5px'  ,  getStyleProperty(foo ,  'border-radius') ,  'gets border-radius')
  t.end();
})<commit_msg>getting expected/actual in tests right<commit_after>'use strict';
/*jshint asi: true, browser: true */

var test = require('tape')
  , getStyleProperty =  require('..');

+function setup() {

  +function createFoo() {
    var elem = document.createElement('div')
    elem.setAttribute('class', 'foo')
    document.body.appendChild(elem)
  }()

  +function loadStyle() {
    var css = [
          '.foo {'
        , '   min-height    :  20px;'
        , '   min-width     :  200px;'
        , '   padding       :  10px;'
        , '   margin        :  10px;'
        , '   background    :  antiquewhite;'
        , '   border        :  1px solid antiquewhite;'
        , '   border-radius :  5px;'
        , ' };'
    ].join('\n');

    var head  = document.getElementsByTagName('head')[0];
    var style = document.createElement('style');

    style.type = 'text/css';

    if (style.styleSheet){
      style.styleSheet.cssText = css;
    } else {
      style.appendChild(document.createTextNode(css));
    }
    head.appendChild(style);
  }()
}()

test('get style property', function (t) {
  var foo = document.querySelector('.foo')
  
  t.equal(getStyleProperty(foo ,  'height')        , '20px' ,  'gets height')
  t.equal(getStyleProperty(foo ,  'min-height')    , '20px' ,  'gets min-height')
  t.equal(getStyleProperty(foo ,  'padding')       , '10px' ,  'gets padding')
  t.equal(getStyleProperty(foo ,  'padding-left')  , '10px' ,  'gets padding-left')
  t.equal(getStyleProperty(foo ,  'margin')        , '10px' ,  'gets margin')
  t.equal(getStyleProperty(foo ,  'margin-left')   , '10px' ,  'gets margin-left')
  t.equal(getStyleProperty(foo ,  'border-radius') , '5px'  ,  'gets border-radius')
  t.end();
})
{'fraction_non_alphanumeric': 0.17163742690058478, 'fraction_numerical': 0.014619883040935672, 'mean_word_length': 2.5159301130524154, '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': '4007415', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1170, 'n_words': 210}