Skip to content

Conversation

v-zhocai
Copy link
Contributor

  • Add 19 more test cases to typespec-vscode package in CI/CI pipeline. (6 in create, 8 in emit, 3 in import, 2 in preview).
  1. 6 cases in Create TypeSpec Project includes:

    • TypeSpec Library (With TypeScript)
    • TypeSpec Emitter (With TypeScript)
    • (rest-api-spec repo) Azure Data Plane Service Project
    • (rest-api-spec repo) Azure Resource Manager Service Project
    • (stand alone) Azure Data Plane Service Project
    • (stand alone) Azure Resource Manager Service Project
  2. 8 cases in Emit TypeSpec Project includes:

    • Emit Client Code from TypeSpec - Python
    • Emit Client Code from TypeSpec - Java
    • Emit Client Code from TypeSpec - .NET
    • Emit Client Code from TypeSpec - JavaScript
    • Emit OpenAPI 3.x from TypeSpec - triggered by command palette
    • Emit OpenAPI 3.x from TypeSpec - triggered by right click
    • Emit Server Stub from TypeSpec - .NET
    • Emit Server Stub from TypeSpec - JavaScript
  3. 3 cases in Import TypeSpec from OpenApI3 includes:

    • Import TypeSpec from OpenAPI3 triggered by command palette
    • Import TypeSpec from OpenAPI3 triggered by right click on file
    • Import TypeSpec from OpenAPI3 triggered by right click on folder
  4. 2 cases in Preview API Documentation includes:

    • Preview API Documentation triggered by command palette
    • Preview API Documentation triggered by right click on file

Test case Emit Server Stub from TypeSpec - JavaScript cannot be activated temporarily due to a known issue, otherwise it will constantly return errors. For details, please refer to #5580 (comment)

Copy link
Contributor

github-actions bot commented Jul 21, 2025

All changed packages have been documented.

  • typespec-vscode
Show changes

typespec-vscode - feature ✏️

Add test case for TypeSpec Extension - 2

@v-zhocai v-zhocai marked this pull request as draft July 21, 2025 08:11
@timotheeguerin
Copy link
Member

I don’t think there is a point to test more than one case for each flow. This is just supposed to check the ui still works anything more specific should be left to faster unit tests

"@types/cross-spawn": "~6.0.6",
"@types/mocha": "^10.0.9",
"@types/node": "~24.0.3",
"@types/semver": "^7.5.8",
"@types/vscode": "~1.100.0",
"@types/which": "^3.0.4",
"@typespec/compiler": "workspace:^",
"@typespec/http": "workspace:^",
"@typespec/openapi": "workspace:^",
"@typespec/openapi3": "workspace:^",
Copy link
Member

Choose a reason for hiding this comment

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

We also shouldn't have tests that depends on other things. This should be testing the ui in the most basic way not the compile or other functionality of those packages.

"@types/cross-spawn": "~6.0.6",
"@types/mocha": "^10.0.9",
"@types/node": "~24.0.3",
"@types/semver": "^7.5.8",
"@types/vscode": "~1.100.0",
"@types/which": "^3.0.4",
"@typespec/compiler": "workspace:^",
"@typespec/http": "workspace:^",
"@typespec/openapi": "workspace:^",
"@typespec/openapi3": "workspace:^",
Copy link
Member

Choose a reason for hiding this comment

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

We also shouldn't have tests that depends on other things. This should be testing the ui in the most basic way not the compile or other functionality of those packages.

@v-zhocai v-zhocai closed this Jul 22, 2025
@v-xuto
Copy link
Contributor

v-xuto commented Jul 22, 2025

Closed this PR, the replacement PR is: #7976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants