Skip to content

Docs: [AEA-0000] - couple of suggestions after cdk work#11

Open
tstephen-nhs wants to merge 3 commits intomainfrom
aea-0000-add-cdk-tips
Open

Docs: [AEA-0000] - couple of suggestions after cdk work#11
tstephen-nhs wants to merge 3 commits intomainfrom
aea-0000-add-cdk-tips

Conversation

@tstephen-nhs
Copy link
Copy Markdown

Summary

  • Routine Change

Details

  • guidance on CDK unit tests focused on consumer products (not eps-cdk-utils)
  • avoid a couple of TypeScript preferences of Copilot unappreciated by Sonarqube

Copilot AI review requested due to automatic review settings April 10, 2026 13:27
@github-actions
Copy link
Copy Markdown
Contributor

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-0000

Copy link
Copy Markdown

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

Updates internal Copilot guidance docs to better align TypeScript/CDK recommendations with preferred testing patterns and linting expectations.

Changes:

  • Add TypeScript guidance to avoid using the void operator as a lint-warning suppression mechanism.
  • Add TypeScript style guidance preferring Array<T> over T[] for array annotations.
  • Add CDK unit testing guidance focused on synth/assertion tests and add a CDK test command to validation steps.

Reviewed changes

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

File Description
.github/instructions/languages/typescript.instructions.md Adds TypeScript-specific style guidance to steer generated/reviewed code away from patterns that can trigger tooling warnings.
.github/instructions/languages/cdk.instructions.md Documents recommended CDK unit test approaches (synth-based assertions) and adds a workspace test command for CDK packages.

Comment thread .github/instructions/languages/cdk.instructions.md Outdated
Comment thread .github/instructions/languages/cdk.instructions.md Outdated
- Keep assertions light-touch and stable, such as resource counts and a small number of important properties.
- Avoid mocking AWS resources or writing tests that attempt to exercise live AWS behaviour.
- CDK constructs suitable for reuse should be placed in `eps-cdk-utils` repo.
- Smaller CDK constructs may be included here and should have associated tests.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets copied to all repos so saying 'Smaller CDK constructs may be included here' does not make sense when this file will also be in eps-cdk-utils repo

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