<commit_before>import React, { Component } from 'react';
import * as alertActions from '../actions/alerts';
import { connect } from "react-redux";
import { bindActionCreators } from 'redux';

import HeaderBar from './HeaderBar';
import Footer from './Footer';

export default class Alert extends Component {
    componentDidMount() {
        this.props.actions.findById(this.props.params.id);
    }
    render() {
        return (
            <div>
                {this.props.alert.title}
            </div>
        );
    }
};


const mapStateToProps = (state) => ({
    alert: state.alert
});

const mapDispatchToProps = (dispatch) => ({
    actions : bindActionCreators(alertActions, dispatch)
});

export default connect(mapStateToProps, mapDispatchToProps)(Alert);
<commit_msg>#8 @sinan-si adds tests for alert detail component<commit_after>import React, { Component } from 'react';
import * as alertActions from '../actions/alerts';
import { connect } from "react-redux";
import { bindActionCreators } from 'redux';

import HeaderBar from './HeaderBar';
import Footer from './Footer';

export class Alert extends Component {
    componentDidMount() {
        this.props.actions.findById(this.props.params.id);
    }
    render() {
        return (
            <span className='alert-title'>
                {this.props.alert.title}
            </span>
        );
    }
};


const mapStateToProps = (state) => ({
    alert: state.alert
});

const mapDispatchToProps = (dispatch) => ({
    actions : bindActionCreators(alertActions, dispatch)
});

export default connect(mapStateToProps, mapDispatchToProps)(Alert);

{'fraction_non_alphanumeric': 0.1314003701418877, 'fraction_numerical': 0.0006169031462060457, 'mean_word_length': 3.116751269035533, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '6309138', 'n_tokens_mistral': 465, 'n_tokens_neox': 458, 'n_words': 115}