<commit_before>$.define("flow","flow,more/spec",function(){
    $.fixture('操作流模块-flow', {
        flow: function(id){
            var flow = new $.flow;
            var callback = function(a,b,c){
                $.log([].slice.call(arguments))
                expect([].slice.call(arguments),id).same([10,20,30])//测试多路监听时收集的返回值
                expect("此流程触发在aaa,bbb,ccc都被fire的情况下",id).eq("此流程触发在aaa,bbb,ccc都被fire的情况下")
            }
            var callback2 = function(a,b,c){
                $.log([].slice.call(arguments))
                expect("此流程触发在aaa,ddd都被fire的情况下",id).eq("此流程触发在aaa,ddd都被fire的情况下")
            }
            flow.bind("aaa,bbb,ccc",callback,false);
            flow.bind("aaa,ddd",callback2,true);
            // $.log(callback.deps)
            expect(callback.deps).same({
                __aaa:1,
                __bbb:1,
                __ccc:1
            });
            // $.log(callback.args)
            expect(callback.args).same(["__aaa", "__bbb", "__ccc"]);//必须这三个事件都被fire才执行callback
            // $.log(callback.reloadAll)
            expect(callback.reloadAll).eq(true);
            //  $.log(flow.root["__aaa"])
            expect(flow.root["__aaa"].unfire.length).eq(2);//__aaa这个事件未绑定的回调已达两个
            flow.fire("aaa",10)
            flow.fire("bbb",20)
            flow.fire("ccc",30);
             flow.fire("aaa",40);
              flow.fire("bbb",20)
               flow.fire("ccc",20)
        }
    });
})
<commit_msg>完成flow的测试<commit_after>$.define("flow","flow,more/spec",function(){
    $.fixture('操作流模块-flow', {
        "reloadAll = false": function(id){
            var flow = new $.flow;
            var callback = function(a,b,c){
                expect([].slice.call(arguments),id).same([10,20,30])//测试多路监听时收集的返回值
                expect("此流程触发在aaa,bbb,ccc都被fire的情况下",id).eq("此流程触发在aaa,bbb,ccc都被fire的情况下")
            }
            var fireCount = 0;//用于统计aaa,bbb这个组合的回调一共执行了多少次
            var callback2 = function(a,b,c){
                fireCount++;
            }
            flow.bind("aaa,bbb,ccc",callback,false);
            flow.bind("aaa,ddd",callback2,false);
            expect(callback.deps).same({
                __aaa:1,
                __bbb:1,
                __ccc:1
            });

            // $.log(callback.args)
            expect(callback.args).same(["__aaa", "__bbb", "__ccc"]);//必须这三个事件都被fire才执行callback
            // $.log(callback.reloadAll)
            expect(callback.reloadAll).eq(false);
            //  $.log(flow.root["__aaa"])
            expect(flow.root["__aaa"].unfire.length).eq(2);//__aaa这个事件未绑定的回调已达两个
            flow.fire("aaa",10);
            flow.fire("bbb",20);
            flow.fire("ccc",30);
            flow.fire("ddd",40);
            flow.fire("ddd",50);
            flow.fire("ddd",60);
            expect(fireCount).eq(3);
        },
        "reloadAll = true": function(){
            var flow = new $.flow;
            var fireCount = 0;//用于统计aa,bb这个组合的回调一共执行了多少次
            var callback = function(){
                fireCount++
            }
            flow.bind("aa,bb,cc",callback,true);
            flow.fire("aa",10);
            flow.fire("bb",20);
            flow.fire("cc",30);
            flow.fire("aa",40);
            flow.fire("bb",50);
            flow.fire("cc",60);
            flow.fire("aa",40);
            flow.fire("bb",50);
            flow.fire("cc",60);
            flow.fire("aa",40);
            flow.fire("bb",50);
            flow.fire("cc",60);
            expect(fireCount).eq(4);
        },
        "fire arguments":function(id){
            var flow = new $.flow;
            var callback = function(){
                var args = [].slice.call(arguments);
                expect(arguments.length ,id).eq( 9 );
                expect(args.join(",") ,id).eq("1,2,3,4,5,6,7,8,9");
            }
            flow.bind("aa,bb,cc",callback,true);
            flow.fire("aa",1,2,3);
            flow.fire("aa",4,5,6)
            flow.fire("aa",7,8,9)
        }

    });
})

{'fraction_non_alphanumeric': 0.1790154152163103, 'fraction_numerical': 0.02362008950770761, 'mean_word_length': 1.6414970453053184, 'pattern_counts': {'":': 3, '<': 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': '607699', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1421, 'n_words': 131}