Skip to content

test(bigtable): adopt run-test runner for bigtable - #9477

Merged
danieljbruce merged 1 commit into
mainfrom
bun-runtime/1-test-runner-handwritten-libraries-4-2
Sep 30, 2026
Merged

danieljbruce merged 1 commit into
mainfrom
bun-runtime/1-test-runner-handwritten-libraries-4-2

Conversation

@danieljbruce

@danieljbruce danieljbruce commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Updated test, system-test, and snippet-test scripts in handwritten/bigtable/package.json to invoke bin/run-test.cjs instead of calling mocha / c8 mocha directly.

No additional library or test changes were necessary because the proxyquire require shim (bin/proxyquire-bun-shim.cjs) already handles module stubbing and cache isolation across Bigtable's unit test suite under Bun. Additionally, the introduction of the --exit flag in bin/run-test.cjs ensures the test runner terminates cleanly after tests complete despite background OpenTelemetry metric timers and gRPC mock server handles.

Impact

This change enables the @google-cloud/bigtable test suites to run seamlessly under both the Node.js and Bun runtimes via the centralized bin/run-test.cjs test runner.

Testing

  • Ran bun --bun run test in handwritten/bigtable and verified that all unit tests pass under the Bun runtime.
  • Verified that unit tests continue passing under the Node.js runtime via node ../../bin/run-test.cjs.

@danieljbruce
danieljbruce requested a review from a team as a code owner September 30, 2026 13:55
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Sep 30, 2026
@github-actions
github-actions Bot requested a review from shivanee-p September 30, 2026 13:55
@danieljbruce

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the test scripts in handwritten/bigtable/package.json (snippet-test, system-test, and test) to execute using a custom test runner script node ../../bin/run-test.cjs instead of calling mocha or c8 mocha directly. There are no review comments, and I have no feedback to provide.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the test scripts in handwritten/bigtable/package.json to run via a centralized test runner script (node ../../bin/run-test.cjs). Feedback on these changes points out that replacing c8 mocha with the new runner in the test script removes code coverage reporting, and suggests wrapping the new command with c8 to restore it.

Comment thread handwritten/bigtable/package.json
@danieljbruce
danieljbruce merged commit fc36a17 into main Sep 30, 2026
54 checks passed
@danieljbruce
danieljbruce deleted the bun-runtime/1-test-runner-handwritten-libraries-4-2 branch September 30, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants