Where should unit tests be placed in Meteor?

后端 未结 4 2031
悲哀的现实
悲哀的现实 2021-02-01 19:12

Is there a place where my tests can live without being run by Meteor?

I just started my first Meteor project, and began by writing unit tests with Mocha

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 20:00

    Place your test files in tests folder and you should be fine. If your application is such that you have multiple files nested in server or client folder, you can replicate similar folder structure within your tests/client or tests/server directory. Not a rule but I think it helps for maintenance and I have had experience of spending hours debugging missing class error which was simply resolved by organising file structure in test folder.

提交回复
热议问题