From d822e99b5b9aa29ff9e8e0bc319d798d59c8f91e Mon Sep 17 00:00:00 2001 From: georgejecook Date: Wed, 29 Nov 2023 12:50:53 +0000 Subject: [PATCH] doc update to provide hints for @sgnode testing --- docs/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 22c1aceb..bc10913f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -277,7 +277,7 @@ The following annotations are supported. | Annotation | Description | Data | |-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------| | @suite | Indicates a file is a test suite. Required. | Name of the test suite. Used in test output | -| @SGNode | Indicates that a test will run in a node. Rooibos plugin will automatically generate the test node and inject all the test code | Name of the component to extend to run tests | +| @SGNode | Indicates that a test will run in a node. Rooibos plugin will automatically generate the test node and inject all the test code. Note you have to have ` "autoImportComponentScript": true,` in your bsconfig.json, for this style of testing to work. | Name of the component to extend to run tests | | @setup | Run once when the suite, or describe group is executed . | | | @tearDown | Run once when the suite or describe group is finished | | | @beforeEach | Run before each test. Can be specified for the `@suite`, or for each `@it` group | | @@ -987,6 +987,8 @@ However, it is useful to be able to test whole real nodes, with observes, and pr In the following example, the tests will be run in a new (auto-generated) component that extends `NodeExample` component. +**NOTE:** you have to have ` "autoImportComponentScript": true,` in your bsconfig.json, for this style of testing to work. + ``` namespace Tests @SGNode NodeExample @@ -1046,6 +1048,8 @@ You should remove any observers and cancel any tasks, etc, in your test cleanup #### Example +**NOTE:** you have to have ` "autoImportComponentScript": true,` in your bsconfig.json, for this style of testing to work. + ``` namespace tests @only