<commit_before>// (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.

var __path__ = '../../src/js/components/index/IndexAttribute';

var ReactTestUtils = require('../../mocks/ReactTestUtils');

describe('Grommet IndexAttribute', function() {
  it('loads a basic IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
       data: 'testing'
      },
      attribute: {
        attribute: 'data'
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', 'testing');
  });

  it('loads an IndexAttribute component where item has multiple attributes', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
        attributes: {
          data: 'testing multiple'
        }
      },
      attribute: {
        attribute: 'data'
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', 'testing multiple');
  });

  it('loads a timestamp IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
        data: 1431391396880
      },
      attribute: {
        attribute: 'data',
        timestamp: true
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', '05/11/15 5:43:16pm');
  });

  it('loads a secondary IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
       data: 'testing'
      },
      attribute: {
        attribute: 'data',
        secondary: true
      }
    });
<commit_msg>Trying to fix test on Travis CI.<commit_after>// (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.

var __path__ = '../../src/js/components/index/IndexAttribute';

var ReactTestUtils = require('../../mocks/ReactTestUtils');

describe('Grommet IndexAttribute', function() {
  it('loads a basic IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
       data: 'testing'
      },
      attribute: {
        attribute: 'data'
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', 'testing');
  });

  it('loads an IndexAttribute component where item has multiple attributes', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
        attributes: {
          data: 'testing multiple'
        }
      },
      attribute: {
        attribute: 'data'
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', 'testing multiple');
  });

  it('loads a timestamp IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
        data: '05/11/2015'
      },
      attribute: {
        attribute: 'data',
        timestamp: true
      }
    });

    ReactTestUtils.componentShouldExist(Component, 'index-attribute', '05/11/15 12:00:00am');
  });

  it('loads a secondary IndexAttribute component', function() {

    var Component = ReactTestUtils.getComponent(__path__, undefined, {
      item: {
       data: 'testing'
      },
      attribute: {
        attribute: 'data',
        secondary: true
      }
    });

{'fraction_non_alphanumeric': 0.12962406015037595, 'fraction_numerical': 0.01804511278195489, 'mean_word_length': 2.737078651685393, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7650117', 'n_tokens_mistral': 961, 'n_tokens_neox': 911, 'n_words': 210}