Where should unit tests be placed in Meteor?

后端 未结 4 2025
悲哀的现实
悲哀的现实 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条回答
  •  伪装坚强ぢ
    2021-02-01 19:54

    Place your tests in the tests/ folder. Unlike Rails, which uses a folder named test for this purpose, Meteor uses the plural tests for this folder name.

    Assets stored in a folder named "tests" will be completely ignored by Meteor; these assets will not be loaded on the client or server.

    Ironically, I was tipped off by someone having the opposite issue who wants their tests loaded by the Meteor client.

提交回复
热议问题