Skip to content

test(shared): add tests for architecture+pattern spectral rules#1835

Merged
rocketstack-matt merged 1 commit intofinos:mainfrom
markscott-ms:tests
Nov 21, 2025
Merged

test(shared): add tests for architecture+pattern spectral rules#1835
rocketstack-matt merged 1 commit intofinos:mainfrom
markscott-ms:tests

Conversation

@markscott-ms
Copy link
Contributor

Description

Add tests for spectral rules relating to architectures and patterns.

This increases the overall test coverage for the shared module above 90%.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Shared (shared/)
  • CALM Widgets (calm-widgets/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • Documentation (docs/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

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 adds comprehensive test coverage for spectral validation functions in both the architecture and pattern modules, increasing the shared module's test coverage above 90%. The tests validate various ID existence checks and uniqueness constraints used in CALM (Common Architecture Language Model) document validation.

Key Changes

  • Added test suites for node and interface ID validation functions in both architecture and pattern contexts
  • Added test coverage for ID uniqueness validation across nodes, relationships, and interfaces
  • Fixed a syntax issue in architecture/ids-are-unique.ts by removing an incorrect semicolon after a function declaration

Reviewed changes

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

Show a summary per file
File Description
shared/src/spectral/functions/pattern/interface-id-exists.spec.ts Tests validation that interface IDs exist in pattern schema structures
shared/src/spectral/functions/pattern/interface-id-exists-on-node.spec.ts Tests validation that interface IDs exist on specific nodes in pattern schemas
shared/src/spectral/functions/pattern/ids-are-unique.spec.ts Tests uniqueness validation for IDs across nodes, relationships, and interfaces in pattern schemas
shared/src/spectral/functions/architecture/node-id-exists.spec.ts Tests validation that node IDs exist in architecture documents
shared/src/spectral/functions/architecture/interface-id-exists.spec.ts Tests validation that interface IDs exist in architecture documents
shared/src/spectral/functions/architecture/interface-id-exists-on-node.spec.ts Tests validation that interface IDs exist on specific nodes in architecture documents
shared/src/spectral/functions/architecture/ids-are-unique.spec.ts Tests uniqueness validation for IDs across nodes, relationships, and interfaces in architecture documents
shared/src/spectral/functions/architecture/ids-are-unique.ts Fixed syntax error by removing incorrect semicolon after named function declaration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rocketstack-matt rocketstack-matt merged commit 4771f4b into finos:main Nov 21, 2025
20 checks passed
@markscott-ms markscott-ms deleted the tests branch February 21, 2026 16:28
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.

3 participants