@ludeo/cli 1.4.1 → 1.4.4

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 CHANGED
@@ -117,6 +117,50 @@ ludeo auth logout
117
117
  - **Cross-Platform**: Works on Windows, macOS, and Linux
118
118
  - **Automatic Updates**: Keep your CLI up to date with npm
119
119
 
120
+ ## Testing
121
+
122
+ The CLI includes comprehensive unit tests that verify core functionality including authentication, build uploads, and request payload validation.
123
+
124
+ ### Running Tests
125
+
126
+ ```bash
127
+ # Run all tests
128
+ go test ./...
129
+
130
+ # Run tests for a specific package
131
+ go test ./pkg/commands -v
132
+ go test ./internal/api -v
133
+
134
+ # Run a specific test
135
+ go test ./pkg/commands -v -run TestAuthSetToken
136
+ go test ./pkg/commands -v -run TestBuildUploadMinor
137
+ go test ./pkg/commands -v -run TestBuildUploadMajor
138
+
139
+ # Run tests with coverage
140
+ go test ./pkg/commands -cover
141
+ go test ./... -coverprofile=coverage.out
142
+
143
+ # View coverage report
144
+ go tool cover -html=coverage.out
145
+ ```
146
+
147
+ ### Test Coverage
148
+
149
+ The test suite includes:
150
+
151
+ - **Authentication Tests**: Verify `set-token` command saves tokens correctly
152
+ - **Build Upload Tests**: Verify minor and major build uploads send correct payloads
153
+ - **Request Validation**: Verify HTTP requests include correct headers and JSON structure
154
+ - **Bug Prevention**: Tests verify that `majorBuildId` is correctly included/excluded based on build type
155
+
156
+ ### Key Tests
157
+
158
+ - `TestAuthSetToken` - Tests token saving functionality
159
+ - `TestBuildUploadMinor` - Verifies minor builds include `majorBuildId` in request
160
+ - `TestBuildUploadMajor` - Verifies major builds exclude `majorBuildId` from request
161
+ - `TestBuildUploadRequestPayload` - Validates exact JSON payload structure
162
+ - `TestBuildUploadRequestHeaders` - Verifies HTTP headers are correct
163
+
120
164
  ## Updating
121
165
 
122
166
  ```bash
package/dist/ludeo CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cli",
3
- "version": "1.4.1",
3
+ "version": "1.4.4",
4
4
  "description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
5
5
  "main": "index.js",
6
6
  "bin": {