<commit_before>'use strict';

var grunt = require('grunt');

module.exports = {

    alreadyBusted: function(test) {
        test.expect(3);

        var alreadyBusted = grunt.file.read('tmp/alreadyBusted.html');
        test.ok(alreadyBusted.match(/alreadyBusted\.css\?(?!ba366c2f0f734f23)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');
        test.ok(alreadyBusted.match(/alreadyBusted\.jpg\?(?!f23467496aef741a)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');
        test.ok(alreadyBusted.match(/alreadyBusted\.js\?(?!b574cbb60333af12)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');

        test.done();
    },

    detectingBustedFiles: function(test) {
        test.expect(3);

        var alreadyBusted = grunt.file.read('tmp/replaceDetectingBustedFiles.html');

        test.ok(alreadyBusted.match(/thisstring.issixteenletters\.c3513ff5442a7187.js/), 'testing already busted JS assets in replaceDetectingBustedFiles');
        test.ok(alreadyBusted.match(/thisstring.issixteenletters\.cb583e512c907d11.css/), 'testing already busted CSS assets in replaceDetectingBustedFiles');
        test.ok(alreadyBusted.match(/thisstring.issixteenletters\.9c8e96e0a125ce49.png/), 'testing already busted image assets in replaceDetectingBustedFiles');

        test.done();
    },

    replaceNameAlreadyBusted: function(test) {
        test.expect(6);

        var standard = grunt.file.read('tmp/replaceAlreadyBusted.html');

        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.js/), 'testing already busted JS assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.js/)[0]));
        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.css/), 'testing already busted CSS assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.css/)[0]));
        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.jpg/), 'testing already busted image assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.jpg/)[0]));

        test.done();
    }

};<commit_msg>Improved test<commit_after>'use strict';

var grunt = require('grunt');

module.exports = {

    alreadyBusted: function(test) {
        test.expect(3);

        var alreadyBusted = grunt.file.read('tmp/alreadyBusted.html');
        test.ok(alreadyBusted.match(/alreadyBusted\.css\?(?!ba366c2f0f734f23)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');
        test.ok(alreadyBusted.match(/alreadyBusted\.jpg\?(?!f23467496aef741a)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');
        test.ok(alreadyBusted.match(/alreadyBusted\.js\?(?!b574cbb60333af12)[a-z0-9]{16}/), 'testing alreadyBusted of CSS, JS and images');

        test.done();
    },

    detectingBustedFiles: function(test) {
        test.expect(3);

        var alreadyBusted = grunt.file.read('tmp/replaceDetectingBustedFiles.html');

        test.ok(alreadyBusted.match(/thisstring\.issixteenletters\.(?!5221569fawfwa2vc)([a-z0-9]{16})\.js/), 'testing already busted JS assets in replaceDetectingBustedFiles');
        test.ok(alreadyBusted.match(/thisstring\.issixteenletters\.(?!5221569fawfwa2vc)([a-z0-9]{16})\.css/), 'testing already busted CSS assets in replaceDetectingBustedFiles');
        test.ok(alreadyBusted.match(/thisstring\.issixteenletters\.(?!5221569fawfwa2vc)([a-z0-9]{16})\.png/), 'testing already busted image assets in replaceDetectingBustedFiles');

        test.done();
    },

    replaceNameAlreadyBusted: function(test) {
        test.expect(6);

        var standard = grunt.file.read('tmp/replaceAlreadyBusted.html');

        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.js/), 'testing already busted JS assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.js/)[0]));
        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.css/), 'testing already busted CSS assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.css/)[0]));
        test.ok(standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.jpg/), 'testing already busted image assets in replaceNameAlreadyBusted');
        test.ok(grunt.file.exists('tmp/assets/' + standard.match(/replaceAlreadyBusted\.[a-z0-9]{16}\.jpg/)[0]));

        test.done();
    }

};
{'fraction_non_alphanumeric': 0.17063663923776526, 'fraction_numerical': 0.046556951061065395, 'mean_word_length': 3.8621052631578947, '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': '7288508', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1543, 'n_words': 211}