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
3 changes: 3 additions & 0 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
echo "Running tests before push..."
npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"prepare": "git config core.hooksPath .hooks 2>/dev/null; npm run build",
"smoke": "node dist/cli.js --help",
"test": "tsc -p tsconfig.test.json && node --test dist-test/*.test.js"
},
Expand Down
7 changes: 4 additions & 3 deletions src/listers.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ exit 1
const result = await listLmStudio("http://localhost:1234", "tok");

assert.deepEqual(result, [{ id: "fallback-model", display: "fallback-model", extras: [] }]);
// Both calls were attempted before falling back.
const argv = readArgvLog().sort();
assert.deepEqual(argv, ["ls --llm --json", "ps --json"]);
// ls is always attempted; ps may or may not have completed before
// Promise.all rejects (race), so only assert ls was called.
const argv = readArgvLog();
assert.ok(argv.includes("ls --llm --json"), "ls should have been called");
},
);

Expand Down
Loading