@layer-drone/protocol 0.0.17 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Protocol SDK Test Setup
2
+
3
+ This directory contains comprehensive tests for the Layer Drone Protocol SDK that validate SDK functionality using mocks and simulated API responses.
4
+
5
+ ## Test Configuration
6
+
7
+ The tests are designed to be completely self-contained and run seamlessly in CI/CD environments without any external dependencies. All API interactions are mocked to ensure reliable, fast test execution.
8
+
9
+ ## Running Tests
10
+
11
+ ### Standard Test Run
12
+ ```bash
13
+ # Run all tests with mocks
14
+ pnpm test
15
+ ```
16
+
17
+ ### With Coverage
18
+ ```bash
19
+ # Run tests with coverage reporting
20
+ pnpm test:coverage
21
+ ```
22
+
23
+ ## Test Coverage
24
+
25
+ The test suite includes:
26
+
27
+ 1. **Client Creation and Configuration** - SDK initialization and configuration
28
+ 2. **API Integration Tests** - Tests using mocked API responses:
29
+ - Health check endpoint (`/`)
30
+ - Sun altitude calculations (`/conditions/sun-altitude`)
31
+ - Event schema retrieval (`/schema/event`)
32
+ 3. **Error Handling** - Network errors, 404s, invalid parameters
33
+ 4. **Response Styles** - Data-only vs full response formats
34
+ 5. **Event Parsing** - Webhook event validation and parsing
35
+ 6. **Integration Tests** - Complete workflows using mocks:
36
+ - Flight workflow (storage key generation, presigned URLs, validation)
37
+ - API token management (CRUD operations)
38
+ - Mission creation workflow
39
+ 7. **Type Safety** - TypeScript type validation and BigInt handling
40
+
41
+ ## SonarQube Integration
42
+
43
+ Test coverage is automatically included in SonarQube scans via the LCOV report at `./coverage/lcov.info`.