Skip to content

Commit 19d0579

Browse files
committed
added explanation for Node test runner & imports in explanations
1 parent e9ff98a commit 19d0579

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ Provide the following properties when configuring the tool:
220220
<summary><strong>Example of Tool Configuration</strong></summary>
221221

222222
```typescript
223+
import { Act, User, Resource, NodeTestRunner } from 'access-control-testing'
224+
223225
const users = [user1]
224226
const resources = [todoResource]
225227
@@ -236,13 +238,15 @@ const act = new Act({
236238

237239
## Running Tests
238240

239-
After setup, tests are generated and executed as follows:
241+
Once all setup steps are completed, you can generate test cases using `generateTestCases()` and run them with a test runner using `.run()`.
240242

243+
Tests can be run with any test runner by extending the abstract class `TestRunner`.
244+
To use the built-in Node.js test runner, the adapter `NodeTestRunner` is available (requires Node.js version 18 or higher).
241245
<details open>
242246
<summary><strong>Example of Running Tests</strong></summary>
243247

244248
```typescript
245-
import { Act, NodeTestRunner } from 'access-control-testing'
249+
import { Act, User, Resource, NodeTestRunner } from 'access-control-testing'
246250
247251
// Assuming setup steps are completed and `act` instance is configured
248252
const testCases = await act.generateTestCases()

0 commit comments

Comments
 (0)