Skip to content

Conversation

@rugvedS07
Copy link
Member

@rugvedS07 rugvedS07 commented Jul 30, 2025

Overview

This brings the first batch of tests which are for non-privileged features and for the commands which don't require some changes to make them 'test-friendly' (example is create command which does not have a one liner approach to run yet)

This PR includes tests for:

  • chat
  • importCmd
  • list
  • load
  • unload
  • status
  • version

Rest of the subcommands tests will be made in separate PRs.

Below is a new format of specifying branch for a specific submodule, as example in this branch the tests would be run on rugved/lms-cli-tests branch of lmstudio.js because that has the logic of running lms-cli tests and the current branch of lms-cli


lmstudio-js-branch:rugved/lms-cli-tests

@github-actions github-actions bot added the CLA signed Indicates if all contributors have signed the CLA label Jul 30, 2025
@rugvedS07 rugvedS07 marked this pull request as ready for review July 30, 2025 22:12
@rugvedS07 rugvedS07 marked this pull request as draft August 15, 2025 21:23
@rugvedS07 rugvedS07 marked this pull request as ready for review August 29, 2025 20:12
@rugvedS07 rugvedS07 requested a review from will-lms August 29, 2025 20:41
Copy link
Contributor

@will-lms will-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing

  Error: A branch or tag with the name 'rugved/lm' could not be found

Is something about the regex match not working?

@rugvedS07
Copy link
Member Author

CI is failing

  Error: A branch or tag with the name 'rugved/lm' could not be found

Is something about the regex match not working?

Fixed

Comment on lines +103 to +113
# mkdir -p /.lmstudio/hub/models/google
# cd /.lmstudio/hub/models/google
# lms clone google/gemma-3-1b
# mkdir -p /.lmstudio/models/lmstudio-community/gemma-3-1b-it-GGUF
# cd /.lmstudio/models/lmstudio-community/gemma-3-1b-it-GGUF
# if ! command -v wget &> /dev/null; then
# apt-get update
# apt-get install -y wget
# fi
# wget --quiet -P /tmp https://models.lmstudio.ai/models/gemma-3-1b-it-Q4_K_M.gguf && mv /tmp/gemma-3-1b-it-Q4_K_M.gguf gemma-3-1b-it-Q4_K_M.gguf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed?

const cliPath = path.join(__dirname, TEST_CLI_PATH);

describe("version command", () => {
it("should display version with ASCII art", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still find this test name to be misleading, as it is not actually testing for the existence of ASCII art.

Also it does not check the key part of the output -- the version. It should make sure the version is present in the output, or at least some v\d+\.\d+\.\d+ check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA signed Indicates if all contributors have signed the CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants