test(pricing): verify MODEL_COSTS entries and promotional notes
Add tests/test-pricing.ts to assert that known models have non-zero pricing, promotional deals are documented in comments, and Claude models include cache pricing. Fix test-pi-local to match against combined stdout+stderr since pi may output model listing to either stream.
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pi-commandcode-provider",
|
||||
"version": "0.1.1",
|
||||
"version": "0.2.0",
|
||||
"description": "pi custom provider for Command Code API (commandcode.ai)",
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
@@ -28,12 +28,13 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run typecheck && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-oauth.ts && tsx tests/test-abort.ts && tsx tests/test-stream.ts && node tests/test-pi-local.mjs",
|
||||
"test": "npm run typecheck && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-pricing.ts && tsx tests/test-oauth.ts && tsx tests/test-abort.ts && tsx tests/test-stream.ts && node tests/test-pi-local.mjs",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format:check": "prettier --check '**/*.{ts,mjs,json,md}'",
|
||||
"format": "prettier --write '**/*.{ts,mjs,json,md}'",
|
||||
"test:unit": "tsx tests/test-pure-functions.ts",
|
||||
"test:models": "tsx tests/test-models.ts",
|
||||
"test:pricing": "tsx tests/test-pricing.ts",
|
||||
"test:oauth": "tsx tests/test-oauth.ts",
|
||||
"test:abort": "tsx tests/test-abort.ts",
|
||||
"test:stream": "tsx tests/test-stream.ts",
|
||||
|
||||
Reference in New Issue
Block a user