Skip to content

ci: generate scripts/output stubs before npm test - #70

Closed
fortunesmith wants to merge 1 commit into
mainfrom
ci/fix-test-stubs
Closed

ci: generate scripts/output stubs before npm test#70
fortunesmith wants to merge 1 commit into
mainfrom
ci/fix-test-stubs

Conversation

@fortunesmith

Copy link
Copy Markdown
Collaborator

What

Adds a workflow step that writes minimal stub files to scripts/output/ before npm test runs.

Why

product_types.json and categories.json are gitignored (they contain real Contentstack UIDs), but the apphubToEntry test suite requires them to exist. With no stubs, the entire apphubToEntry describe block fails with MODULE_NOT_FOUND and 3 tests are lost.

Result

All 31 tests now pass in CI. No credentials required — the stubs contain placeholder UIDs sufficient for the test assertions.

Made with Cursor

The apphubToEntry test suite requires product_types.json and
categories.json in scripts/output/, which are normally fetched from
Contentstack and gitignored. Add a step that writes minimal stub
files with placeholder UIDs so all 31 tests pass in CI without
needing live credentials.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fortunesmith
fortunesmith deleted the ci/fix-test-stubs branch June 24, 2026 19:25
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.

1 participant