You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,17 +38,10 @@ End-to-end tests for the ResilientOperation class:
38
38
-**Caching**: Tests result caching and duplicate call avoidance
39
39
-**Preset Configurations**: Tests different preset configurations (fast, reliable)
40
40
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
-
48
41
## Running Tests
49
42
50
43
### Prerequisites
51
-
Make sure you have Jest installed:
44
+
Make sure you have the required dependencies installed:
52
45
```bash
53
46
npm install
54
47
```
@@ -106,7 +99,7 @@ Each test file follows this pattern:
106
99
107
100
## Mocking Strategy
108
101
109
-
The tests use Jest mocks for:
102
+
The tests use Sinon mocks for:
110
103
-`fetch` API for HTTP requests
111
104
-`console` methods to reduce test noise
112
105
-`setTimeout`/`setInterval` for time-based tests
@@ -147,9 +140,16 @@ When adding new tests:
147
140
148
141
## Test Configuration
149
142
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