Skip to content

Update dependencies#496

Merged
lwrubel merged 3 commits into
mainfrom
update-dependencies
May 18, 2026
Merged

Update dependencies#496
lwrubel merged 3 commits into
mainfrom
update-dependencies

Conversation

@dlss-infra-bot
Copy link
Copy Markdown
Contributor

No description provided.

dlss-infra-bot and others added 3 commits May 18, 2026 01:11
@smithy/core v3.x introduced sub-path exports (/schema, /protocols, etc.)
with circular dependencies that break Jest 27's module system. When aws.js
is loaded (directly or via app.js), it initializes all 5 AWS SDK clients at
module level; any unmocked client triggers the cycle, leaving schema undefined
and crashing with "Cannot read properties of undefined (reading 'for')".

Fixes:
- Add __tests__/__mocks__/aws.js with jest.fn() stubs for all aws.js exports
- Endpoint tests: switch jest.mock("aws.js") to use factory pointing at the
  manual mock, preventing the real aws.js from loading
- AWS unit tests: add stub mocks for each AWS SDK client not under test so
  none of the real constructors run during module initialization
- app.test.js, error.test.js: mock aws.js since they load it via app.js
- package.json: add testPathIgnorePatterns to exclude __mocks__/ from test
  discovery

Generated with Claude Sonnet 4.6 (claude-sonnet-4-6) via Claude Code
Framework: Jest 27 (babel-jest)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
 Generated with Claude Sonnet 4.6 (claude-sonnet-4-6) via Claude Code
 Framework: Jest 27 (babel-jest), ESLint 7
@lwrubel lwrubel merged commit 4a9e5c9 into main May 18, 2026
1 check passed
@lwrubel lwrubel deleted the update-dependencies branch May 18, 2026 17:18
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