Skip to content

Add document symbol provider test #527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mshr-h
Copy link
Owner

@mshr-h mshr-h commented Jun 11, 2025

Summary

  • add integration test for VerilogDocumentSymbolProvider
  • run tests via runTest.ts
  • correct extension path in test harness

Testing

  • npm test (fails: SIGSEGV from VS Code due to missing display)

https://chatgpt.com/codex/tasks/task_e_6848e6ea25d88324a2f7dfe40f1f6974

@mshr-h mshr-h added the codex label Jun 11, 2025 — with ChatGPT Connector
@mshr-h mshr-h requested a review from Copilot June 12, 2025 05:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an integration test for the VerilogDocumentSymbolProvider and updates test configurations.

  • Added an integration test in documentSymbol.test.ts that verifies document symbols are returned from a simple verilog file
  • Updated the test harness configuration in runTest.ts by correcting the extension development path
  • Modified the test script in package.json to use runTest.js

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/test/suite/documentSymbol.test.ts Added integration test for VerilogDocumentSymbolProvider
src/test/runTest.ts Corrected the extension development path
package.json Updated the test script to reference runTest.js
Comments suppressed due to low confidence (1)

package.json:595

  • Ensure that the updated test runner file path matches the build output and update any relevant documentation accordingly.
"test": "node ./out/src/test/runTest.js"

const document = await vscode.workspace.openTextDocument(filePath);
await vscode.window.showTextDocument(document);

await vscode.workspace.getConfiguration('verilog').update('ctags.path', 'ctags', vscode.ConfigurationTarget.Global);
Copy link
Preview

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

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

Consider using the workspace configuration target rather than Global in tests to minimize unintended side effects on user settings.

Suggested change
await vscode.workspace.getConfiguration('verilog').update('ctags.path', 'ctags', vscode.ConfigurationTarget.Global);
await vscode.workspace.getConfiguration('verilog').update('ctags.path', 'ctags', vscode.ConfigurationTarget.Workspace);

Copilot uses AI. Check for mistakes.

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

Successfully merging this pull request may close these issues.

1 participant