Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Import from @google-cloud/logging makes jest tests hang #1515

@MaxDonchenko

Description

@MaxDonchenko
  1. Is this a client library issue or a product issue?
    It's a library issue.

  2. Did someone already solve this?
    It doesn't seem to be solved - Google doesn't give such results.

  3. Do you have a support contract?
    Yes, I'll duplicate this request there as well.

Environment details

  • OS: MacOS 14.1.1 (23B81), M1 chip
  • Node.js version: 18.17.1
  • yarn version: 1.22.19
  • @google-cloud/logging version: both 11.1.0 and 10.4.0

Steps to reproduce

  1. clone https://github.com/goodwin64/gcp-logging-jest-timeout
  2. yarn install
  3. yarn test
  4. Notice jest warns there are unresolved async operations:
gcp-logging-jest-timeout % yarn test
yarn run v1.22.19
$ jest
 PASS  src/trueBeTrue.test.ts
  true is true
    ✓ should be true (1 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        4.142 s, estimated 5 s
Ran all test suites.
Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
✨  Done in 8.10s.

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/nodejs-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions