[jules] feat: Add deeper tests for poml-vscode preview commands #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces more comprehensive tests for the poml-vscode extension's preview functionality.
New tests in
packages/poml-vscode/tests/command.test.ts
verify that the commands:poml.showPreview
poml.showPreviewToSide
poml.showLockedPreviewToSide
result in a visible 'poml.preview' webview panel.These tests currently fail, correctly identifying an issue within the extension: when using untitled documents (as the tests do), the preview panel fails to load, throwing an "Error: Request poml/preview failed with message: The URL must be of scheme file".
The test setup includes:
ensureExtensionActivatedOnce
) due to persistent TypeScript/Mocha typing issues withbeforeAll
in the build environment..vscode-test.mjs
for correct test discovery.npm run build-extension
is run before tests.The existing test in
extension.test.ts
(checking for command registration) continues to pass. The new failing tests serve as a valuable indicator of an area needing a bug fix in the extension.