<commit_before>/**
 * Check the title of the current browser window contains expected text/title
 * @param  {Type}     falseCase     Whether to check if the title contains the
 *                                  expected value or not
 * @param  {Type}     expectedTitle The expected title
 */
module.exports = (falseCase, expectedTitle) => {
    /**
     * The title of the current browser window
     * @type {String}
     */
    const title = browser.getTitle();

    if (falseCase) {
        expect(title).to.not
            .contain(
                expectedTitle,
                `Expected title not to contain "${expectedTitle}"`
            );
    } else {
        expect(title).to
            .contain(
                expectedTitle,
                `Expected title to contain "${expectedTitle}" but found "${title}"`
            );
    }
};
<commit_msg>Update checkTitleContains.js<commit_after>/**
 * Check the title of the current browser window contains expected text/title
 * @param  {Type}     falseCase     Whether to check if the title contains the
 *                                  expected value or not
 * @param  {Type}     expectedTitle The expected title
 */
module.exports = (falseCase, expectedTitle) => {
    /**
     * The actual title of the current browser window
     * @type {String}
     */
    const title = browser.getTitle();

    if (falseCase) {
        expect(title).to.not
            .contain(
                expectedTitle,
                `Expected title not to contain "${expectedTitle}"`
            );
    } else {
        expect(title).to
            .contain(
                expectedTitle,
                `Expected title to contain "${expectedTitle}" 
                        but found "${title}"`
            );
    }
};

{'fraction_non_alphanumeric': 0.09768492377188029, 'fraction_numerical': 0.0, 'mean_word_length': 1.656671664167916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '809378', 'n_tokens_mistral': 441, 'n_tokens_neox': 426, 'n_words': 144}