Skip to content

Conversation

@anesvijskij
Copy link
Collaborator

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

  • Added a GitHub Actions workflow (.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

  • Added integration tests for HTML completion and definition providers (src/test/suite/htmlProviders.test.ts), covering view and field suggestions and definition navigation.
  • Implemented validation tests for HTML diagnostics (src/test/suite/htmlValidation.test.ts), checking for missing view bindings and field names.
  • Added shared logic tests for attribute parsing and context extraction (src/test/suite/htmlShared.test.ts).
  • Created test fixtures for various HTML and TypeScript scenarios (src/test/fixtures/html/*.html, src/test/fixtures/html/*.ts, src/test/fixtures/metadata/*.ts).
  • Added a test runner entrypoint and suite loader (src/test/runTest.ts, src/test/suite/index.ts) using Mocha and glob for test discovery.

Codebase Improvements for Testability

  • Changed HtmlCompletionProvider and HtmlDefinitionProvider classes to be exported, enabling direct instantiation in tests.
  • Removed the old sample extension test (src/test/extension.test.ts).

Dependency Updates

  • Added glob as a dev dependency for test discovery and ensured dependencies are listed in the correct order in package.json and package-lock.json

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 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.

@anesvijskij anesvijskij merged commit db2147b into main Nov 28, 2025
6 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.

3 participants