Skip to content

Commit

Permalink
Chore/doc update (#244)
Browse files Browse the repository at this point in the history
* silence some diagnostics

* doc update to provide hints for @SGNode testing
  • Loading branch information
georgejecook authored Nov 29, 2023
1 parent 8c9e55a commit e199c5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
4 changes: 3 additions & 1 deletion tests/bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
1107,
1009
]
}
},
1128,
1001
],
"plugins": [
"../bsc-plugin/src/plugin.ts"
Expand Down

0 comments on commit e199c5f

Please sign in to comment.