Skip to content

Investigation: No import.meta.url test failures found#507

Closed
hotlong with Copilot wants to merge 1 commit into
mainfrom
copilot/add-jest-mocks-for-core
Closed

Investigation: No import.meta.url test failures found#507
hotlong with Copilot wants to merge 1 commit into
mainfrom
copilot/add-jest-mocks-for-core

Conversation

Copilot AI commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Investigation Summary

Problem statement claimed Jest cannot parse import.meta.url from @objectstack/core@0.9.2, causing test failures in plugin-formula and plugin-validator packages.

Findings

No test failures exist:

  • All 3,422 tests pass (3,232 in @objectstack/spec, 190 in @objectstack/core)
  • import.meta.url usage in packages/core/src/logger.ts:60 does not cause failures

Environment mismatch:

  • Repository uses Vitest, not Jest
  • No jest.config.js files exist
  • All test configs are vitest.config.ts

Packages do not exist:

  • plugin-formula - not found
  • plugin-validator - not found (only plugin-validator.zod.ts schema exists in packages/spec/src/system/)

Conclusion

Problem statement does not match repository state. No changes required.

If this was intended for external consumers of @objectstack/core, documentation on mocking strategies could be added separately.

Original prompt

Jest cannot parse import.meta.url from @objectstack/core@0.9.2 when running in CommonJS mode, causing test failures in plugin-formula and plugin-validator.

Changes

Added Jest mocks for @objectstack/core following the existing pattern from core, protocol-graphql, and other packages:

plugin-formula

test/mocks/@objectstack/core.ts - Mock implementations
jest.config.js - Added moduleNameMapper entry
plugin-validator

test/mocks/@objectstack/core.ts - Mock implementations
jest.config.js - Added moduleNameMapper entry


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Feb 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Feb 3, 2026 5:01pm

Request Review

Copilot AI changed the title [WIP] Add Jest mocks for @objectstack/core to fix test failures Investigation: No import.meta.url test failures found Feb 3, 2026
Copilot AI requested a review from hotlong February 3, 2026 17:01
@hotlong hotlong closed this Feb 4, 2026
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.

2 participants