Skip to content

[codex] Fix preview test and extend mocha timeout#17

Merged
ultmaster merged 1 commit intomicrosoft:mainfrom
ultmaster:codex/add-basic-tests-for-poml-vscode-extension
Jun 19, 2025
Merged

[codex] Fix preview test and extend mocha timeout#17
ultmaster merged 1 commit intomicrosoft:mainfrom
ultmaster:codex/add-basic-tests-for-poml-vscode-extension

Conversation

@ultmaster
Copy link
Contributor

Summary

  • remove jest mocks and convert vscode extension tests to mocha
  • configure vscode-test runner and point to compiled test path
  • add preview fixture file and update workflow to run vscode tests
  • test preview command, command registration, and extension activation

Testing

  • npm test -- -w=packages/poml/tests
  • xvfb-run -a npm run test-vscode

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

@ultmaster ultmaster requested a review from Copilot June 19, 2025 08:19
Copy link
Contributor

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 updates the testing framework for the extension by removing jest mocks and converting tests to mocha, along with extending the mocha timeout and updating workflow configurations.

  • Migrated tests from Jest to Mocha
  • Updated VS Code test runner configuration and fixture paths
  • Extended test timeout for preview command and updated GitHub workflows

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/poml-vscode/tests/preview.test.ts Adds a test for the preview command with an extended timeout
packages/poml-vscode/tests/panelContent.test.ts Implements panel content helper test
packages/poml-vscode/tests/extension.test.ts Updates extension activation verification test
packages/poml-vscode/tests/commands.test.ts Verifies the registration of multiple commands
packages/poml-vscode/test-fixtures/test.poml Provides a new fixture for testing the preview command
.vscode-test.mjs Adjusts the file glob pattern to point to the correct test location
.github/workflows/test.yml Updates CI workflows to run tests appropriately on Linux and non-Linux runners
Comments suppressed due to low confidence (1)

packages/poml-vscode/tests/preview.test.ts:15

  • The test currently only asserts truthiness with 'assert.ok(true)', which does not validate the actual behavior of the preview command. Consider adding specific assertions to verify that the preview has been rendered or updated as expected.
    assert.ok(true);

@ultmaster ultmaster merged commit b467ef2 into microsoft:main Jun 19, 2025
3 checks passed
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.

2 participants