<commit_before>/* globals expect, $, TestUtils, reset, render, React */
import {Flummox} from 'flummox';
import EssentialsStore from 'common/src/data/essentials/essentials-store';
import EssentialsTypes from 'common/src/data/essentials/essentials-types';
import * as EssentialsGetter from 'common/src/data/essentials/essentials-getter';

import UserStore from 'common/src/data/user/user-store';
import UserTypes from 'common/src/data/user/user-types';
import * as UserGetter from 'common/src/data/user/user-getter';

import Detail from 'resource/src/resource-detail/resource-detail.jsx';
import {bindGettersToState} from 'common/src/util';

const ID = 'sales_order',
      TEST_RES = {
            id: 'sales_order',
            name: 'Sales Order',
            description: '# Sales Orders',
            resource_owners: ['employees']
        };

describe('The resource detail view', () => {
    var props,
        detail;

    beforeEach(() => {
        reset();
        let essentialsState = EssentialsStore(EssentialsStore(), {
            type: EssentialsTypes.FETCH_RESOURCE,
            payload: TEST_RES
        }),
        userState = UserStore();

        props = {
            resourceId: ID,
            essentialsStore: bindGettersToState(essentialsState, EssentialsGetter),
            userStore: bindGettersToState(userState, UserGetter)
        };
        detail = render(Detail, props);
    });

    it('should contain rendered markdown', () => {
        let description = TestUtils.findRenderedDOMComponentWithAttributeValue(detail, 'data-block', 'description');
        expect($(React.findDOMNode(description)).find('h1').length).to.equal(1);
    });

});
<commit_msg>#324 missed a flummox ref<commit_after>/* globals expect, $, TestUtils, reset, render, React */
import EssentialsStore from 'common/src/data/essentials/essentials-store';
import EssentialsTypes from 'common/src/data/essentials/essentials-types';
import * as EssentialsGetter from 'common/src/data/essentials/essentials-getter';

import UserStore from 'common/src/data/user/user-store';
import UserTypes from 'common/src/data/user/user-types';
import * as UserGetter from 'common/src/data/user/user-getter';

import Detail from 'resource/src/resource-detail/resource-detail.jsx';
import {bindGettersToState} from 'common/src/util';

const ID = 'sales_order',
      TEST_RES = {
            id: 'sales_order',
            name: 'Sales Order',
            description: '# Sales Orders',
            resource_owners: ['employees']
        };

describe('The resource detail view', () => {
    var props,
        detail;

    beforeEach(() => {
        reset();
        let essentialsState = EssentialsStore(EssentialsStore(), {
            type: EssentialsTypes.FETCH_RESOURCE,
            payload: TEST_RES
        }),
        userState = UserStore();

        props = {
            resourceId: ID,
            essentialsStore: bindGettersToState(essentialsState, EssentialsGetter),
            userStore: bindGettersToState(userState, UserGetter)
        };
        detail = render(Detail, props);
    });

    it('should contain rendered markdown', () => {
        let description = TestUtils.findRenderedDOMComponentWithAttributeValue(detail, 'data-block', 'description');
        expect($(React.findDOMNode(description)).find('h1').length).to.equal(1);
    });

});

{'fraction_non_alphanumeric': 0.12764688338801072, 'fraction_numerical': 0.0020876826722338203, 'mean_word_length': 3.125461254612546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5904221', 'n_tokens_mistral': 963, 'n_tokens_neox': 948, 'n_words': 198}