-
Notifications
You must be signed in to change notification settings - Fork 0
First HTML validations tests #6
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
Conversation
… metadata collection and view binding resolution
…nd add integration tests for HTML completion and definition providers
There was a problem hiding this 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 establishes a comprehensive automated testing framework for the AcuMate VS Code extension with integration tests for HTML providers, validation logic, and metadata utilities. A GitHub Actions CI workflow ensures tests run on Node.js 18.x and 20.x before merges.
- Adds integration tests for HTML completion, definition providers, and validation diagnostics
- Implements test infrastructure with Mocha test runner and glob-based test discovery
- Sets up CI/CD pipeline with GitHub Actions for automated testing on pushes and pull requests
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
New CI workflow to run tests on Node 18.x and 20.x |
tsconfig.json |
Added skipLibCheck compiler option for faster builds |
package.json |
Added glob dev dependency and alphabetized dependencies |
package-lock.json |
Updated lockfile with glob dependency |
src/test/runTest.ts |
Test runner entrypoint using @vscode/test-electron |
src/test/suite/index.ts |
Mocha test suite loader with glob-based test discovery |
src/test/suite/utils.test.ts |
Tests for metadata collection and view binding resolution |
src/test/suite/htmlValidation.test.ts |
Tests for HTML diagnostic validation (missing bindings/fields) |
src/test/suite/htmlShared.test.ts |
Tests for HTML attribute parsing and context extraction |
src/test/suite/htmlProviders.test.ts |
Integration tests for completion and definition providers |
src/test/fixtures/* |
Test fixtures including HTML templates, TypeScript screens, and type declarations |
src/providers/html-completion-provider.ts |
Exported class for direct instantiation in tests |
src/providers/html-definition-provider.ts |
Exported class for direct instantiation in tests |
src/test/extension.test.ts |
Removed old sample test file |
readme.md |
Added documentation for automated testing and CI workflow |
Files not reviewed (1)
- acumate-plugin/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a comprehensive automated testing setup for the AcuMate VS Code extension and adds integration, validation, and shared logic tests for HTML providers. It also updates the documentation to reflect the new CI workflow and makes minor codebase improvements for testability and maintainability.
Continuous Integration and Testing Setup
.github/workflows/ci.yml) to automatically run tests on pushes and pull requests for Node.js versions 18.x and 20.x, ensuring extension stability before merges.Automated Test Suite Implementation
src/test/suite/htmlProviders.test.ts), covering view and field suggestions and definition navigation.src/test/suite/htmlValidation.test.ts), checking for missing view bindings and field names.src/test/suite/htmlShared.test.ts).src/test/fixtures/html/*.html,src/test/fixtures/html/*.ts,src/test/fixtures/metadata/*.ts).src/test/runTest.ts,src/test/suite/index.ts) using Mocha and glob for test discovery.Codebase Improvements for Testability
HtmlCompletionProviderandHtmlDefinitionProviderclasses to be exported, enabling direct instantiation in tests.src/test/extension.test.ts).Dependency Updates
globas a dev dependency for test discovery and ensured dependencies are listed in the correct order inpackage.jsonandpackage-lock.json