Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,15 @@ postman-sdk/
│ ├── index.js # Main entry point, exports all modules
│ ├── core/
│ │ ├── config.js # Configuration (baseUrl, apiKey from env)
│ │ ├── request.js # buildAxiosConfig and executeRequest helpers
│ │ └── utils.js # Shared utilities (query param building, etc.)
│ │ └── utils.js # Core utilities (buildAxiosConfig, executeRequest, query params, etc.)
│ ├── collections/
│ │ └── index.js # Collection endpoints
│ │ └── collection.js # Collection endpoints
│ ├── requests/
│ │ └── index.js # Request endpoints
│ │ └── request.js # Request endpoints
│ ├── workspaces/
│ │ └── index.js # Workspace endpoints
│ │ └── workspace.js # Workspace endpoints
│ └── specs/
│ └── index.js # Spec endpoints
│ └── spec.js # Spec endpoints
├── package.json
├── README.md

Expand Down Expand Up @@ -231,11 +230,10 @@ The SDK includes comprehensive test coverage with unit tests, integration tests,

### Test Organization

The test suite is organized into three levels:
The test suite is organized into two levels:

1. **Unit Tests** - Fast, mocked tests for individual functions and modules
2. **Integration Tests** - Tests that use real resources (e.g., file system) but don't call external APIs
3. **Functional Tests** - End-to-end tests that make real API calls to Postman
2. **Functional Tests** - End-to-end tests that make real API calls to Postman

### Unit Tests

Expand All @@ -246,14 +244,12 @@ npm run test:unit
```

Unit tests cover:
- Main SDK entry point (`src/__tests__/index.unit.test.js`)
- Core utilities (request building, query strings, UID construction)
- Main SDK entry point (`src/__tests__/sdk.unit.test.js`)
- Core utilities (`src/core/__tests__/utils.unit.test.js`) - request building, query strings, ID/UID validation
- Test helpers (`src/__tests__/test-helpers.test.js`)
- All module exports and function signatures
- Error handling and edge cases

**Integration Tests** are included in the unit test suite and run actual file system operations:
- Fixtures loading (`src/core/__tests__/fixtures.integration.test.js`)

### Functional Tests

Run the complete functional test suite (executes all functional tests in proper dependency order):
Expand Down
4 changes: 2 additions & 2 deletions docs/API-ENDPOINTS-TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ This document tracks the implementation status of all Postman API endpoints in t

| Method | Endpoint | Description | Function | Implemented | Tests |
|--------|----------|-------------|----------|-------------|-------|
| POST | `/mocks/{mockId}/publish` | Publish a mock | `createMockPublish()` | ✅ | ✅ Passing |
| DELETE | `/mocks/{mockId}/unpublish` | Unpublish a mock | `deleteMockUnpublish()` | ✅ | ✅ Passing |
| POST | `/mocks/{mockId}/publish` | Publish a mock | `publishMock()` | ✅ | ✅ Passing |
| DELETE | `/mocks/{mockId}/unpublish` | Unpublish a mock | `unpublishMock()` | ✅ | ✅ Passing |
| GET | `/mocks/{mockId}/call-logs` | Get mock call logs | `getMockCallLogs()` | ✅ | ✅ Passing |

### Mock Server Responses
Expand Down
2,047 changes: 1,395 additions & 652 deletions docs/API-REFERENCE.md

Large diffs are not rendered by default.

Loading