Skip to content

Commit

Permalink
doc update to provide hints for @SGNode testing
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejecook committed Nov 29, 2023
1 parent 4a86207 commit d822e99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a name="common-tdd-methods"></a>. | |
| @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 | |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d822e99

Please sign in to comment.