From 68241fe321ff651be4a37be3f95b19e109287227 Mon Sep 17 00:00:00 2001 From: jamauro Date: Sat, 28 Oct 2023 14:43:34 -0500 Subject: [PATCH] Update Testing section for Tinytest --- guide/source/writing-atmosphere-packages.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/guide/source/writing-atmosphere-packages.md b/guide/source/writing-atmosphere-packages.md index d40c696f52..3568d8d7b1 100644 --- a/guide/source/writing-atmosphere-packages.md +++ b/guide/source/writing-atmosphere-packages.md @@ -264,13 +264,21 @@ Read more about using Cordova in the [mobile guide](mobile.html).

Testing packages

-Meteor has a test mode for packages called `meteor test-packages`. If you are in a package's directory, you can run +Meteor has a test mode for packages called `meteor test-packages`. If you are in a package's directory and using [Tinytest](https://github.com/meteor/meteor/tree/devel/packages/tinytest), you can run + +```bash +meteor test-packages ./ +``` + +This will run a special app containing only a "test" version of your package. + +If using Mocha for your package's tests, you can run ```bash meteor test-packages ./ --driver-package meteortesting:mocha ``` -This will run a special app containing only a "test" version of your package and start a Mocha [test driver package](testing.html#driver-packages). +to start a Mocha [test driver package](testing.html#driver-packages). When your package starts in test mode, rather than loading the `onUse` block, Meteor loads the `onTest` block: