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

后端 未结 7 645
感情败类
感情败类 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: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.

    0 讨论(0)
提交回复
热议问题