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

后端 未结 7 682
感情败类
感情败类 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条回答
  •  Happy的楠姐
    2020-12-13 09:13

    In the second file, require the first one:

    --- two.js ---
    require("./one")
    

    Mocha will run the tests in the order the describe calls execute.

提交回复
热议问题