<commit_before>var ModuleTestWMJSZip = (function(global) {

var _runOnNode = "process" in global;
var _runOnWorker = "WorkerLocation" in global;
var _runOnBrowser = "document" in global;
var JSZip = WMJSZip;
return new Test("WMJSZip", {
        disable:    false,
        browser:    true,
        worker:     true,
        node:       false,
        button:     true,
        both:       true, // test the primary module and secondary module
    }).add([
        test_WMJSZip,
    ]).run().clone();

function test_WMJSZip(test, pass, miss) {
     var zipObj = new JSZip();
     var expected = "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs="
     zipObj.file("smile.gif", expected, {base64: true});
     var base64 = zipObj.generate({DEFLATE: "DEFLATE"});
     var arraybuffer = zipObj.load(base64, {base64: true}).file("smile.gif").asArrayBuffer();
     var reader = new FileReader();
     reader.readAsDataURL(new Blob([arraybuffer], {mimeType:"image/gif"}));
     reader.onloadend = function(ev){
        var actuary = reader.result.replace(/data\:\;base64\,(.+)/, "$1");
        console.log(actuary, expected);
        if (actuary === expected) {
            test.done(pass());
        } else {
            test.done(miss());
        }
     }
}

})((this || 0).self || global);
<commit_msg>little fix<commit_after>var ModuleTestWMJSZip = (function(global) {

var _runOnNode = "process" in global;
var _runOnWorker = "WorkerLocation" in global;
var _runOnBrowser = "document" in global;

return new Test("WMJSZip", {
        disable:    false,
        browser:    true,
        worker:     true,
        node:       false,
        button:     true,
        both:       true, // test the primary module and secondary module
    }).add([
        test_WMJSZip,
    ]).run().clone();

function test_WMJSZip(test, pass, miss) {
     var zipObj = new WMJSZip();
     var expected = "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs="
     zipObj.file("smile.gif", expected, {base64: true});
     var base64 = zipObj.generate({DEFLATE: "DEFLATE"});
     var arraybuffer = zipObj.load(base64, {base64: true}).file("smile.gif").asArrayBuffer();
     var reader = new FileReader();
     reader.readAsDataURL(new Blob([arraybuffer], {mimeType:"image/gif"}));
     reader.onloadend = function(ev){
        var actuary = reader.result.replace(/data\:\;base64\,(.+)/, "$1");
        console.log(actuary, expected);
        if (actuary === expected) {
            test.done(pass());
        } else {
            test.done(miss());
        }
     }
}

})((this || 0).self || global);

{'fraction_non_alphanumeric': 0.15063731170336037, 'fraction_numerical': 0.010042487446890692, 'mean_word_length': 2.715925394548063, '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': '7096823', 'n_tokens_mistral': 878, 'n_tokens_neox': 840, 'n_words': 186}