Skip to content

Commit 701af62

Browse files
committed
docs: make the sync test readme up to date
1 parent 67dd7e4 commit 701af62

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

test/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ResilientLLM Test Suite
22

3-
This directory contains comprehensive test suites for the ResilientLLM chat function.
3+
This directory contains comprehensive test suites for the ResilientLLM chat function and ResilientOperation components.
44

55
## Test Files
66

@@ -25,7 +25,7 @@ Unit tests for individual methods and components:
2525
- **Constructor and Configuration**: Tests initialization and configuration options
2626

2727
### `resilient-llm.unit.test.js`
28-
Unit tests for the ResilientOperation integration:
28+
Unit tests for the ResilientLLM class integration with ResilientOperation:
2929
- **Async Function Execution**: Tests basic async function execution
3030
- **Parameter Passing**: Tests function execution with parameters
3131
- **Object Returns**: Tests functions returning objects
@@ -38,17 +38,10 @@ End-to-end tests for the ResilientOperation class:
3838
- **Caching**: Tests result caching and duplicate call avoidance
3939
- **Preset Configurations**: Tests different preset configurations (fast, reliable)
4040

41-
### `test-runner.js`
42-
A simple test runner utility that:
43-
- Verifies test file existence
44-
- Checks Jest installation
45-
- Validates module imports
46-
- Provides test coverage summary
47-
4841
## Running Tests
4942

5043
### Prerequisites
51-
Make sure you have Jest installed:
44+
Make sure you have the required dependencies installed:
5245
```bash
5346
npm install
5447
```
@@ -106,7 +99,7 @@ Each test file follows this pattern:
10699

107100
## Mocking Strategy
108101

109-
The tests use Jest mocks for:
102+
The tests use Sinon mocks for:
110103
- `fetch` API for HTTP requests
111104
- `console` methods to reduce test noise
112105
- `setTimeout`/`setInterval` for time-based tests
@@ -147,9 +140,16 @@ When adding new tests:
147140

148141
## Test Configuration
149142

150-
The test configuration is in `jest.config.js` and includes:
151-
- ES module support
152-
- Test environment setup
153-
- Coverage reporting
154-
- File matching patterns
155-
- Global mocks and setup
143+
The project includes a `jest.config.js` file for potential Jest configuration, but the current test suite uses **Mocha** as the test runner with the following dependencies:
144+
145+
### Testing Dependencies
146+
- **Mocha**: Test framework for running tests
147+
- **Chai**: Assertion library with promise support (`chai-as-promised`)
148+
- **Sinon**: Mocking and stubbing library
149+
- **NYC**: Code coverage tool
150+
151+
### Test Scripts (from package.json)
152+
- `npm test`: Runs all tests using Mocha
153+
- `npm run test:watch`: Runs tests in watch mode
154+
- `npm run test:coverage`: Runs tests with coverage reporting using NYC
155+
- `npm run test:e2e`: Runs only end-to-end tests with extended timeout

0 commit comments

Comments
 (0)