How to set execution order of mocha test cases in multiple files

后端 未结 7 643
感情败类
感情败类 2020-12-13 08:42

I have two javascript files which contain mocha test cases.

//----------abc.js -------------

describe(\"abc file\", function(){
  it(\"test 1\" , function(         


        
7条回答
  •  醉梦人生
    2020-12-13 09:00

    Mocha has a --sort (short -S) option that sorts test files:

    $ mocha --help
    
    [...]
        -S, --sort                              sort test files
    [...]
    

提交回复
热议问题