Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: reproduce "minimal" Jest memory leak #11762

Closed
wants to merge 2 commits into from

Conversation

Jolg42
Copy link
Member

@Jolg42 Jolg42 commented Feb 11, 2022

Could be related to
ts-jest
kulshekhar/ts-jest#1967
which was reported to jest
jestjs/jest#6814

Another maybe related issue
jestjs/jest#6814

Setup, created a minimal test.ts and duplicated it many times (150 times)

To duplicate the test.ts file:

cd packages/client/src/__tests__/integration/empty-tests-jest
rm test*
seq 150 | xargs -I AAA cp original.ts testAAA.ts

To run

cd packages/client

# for logging of heap to console
PRISMA_CLIENT_ENGINE_TYPE=library node ./node_modules/jest/bin/jest.js --runInBand --logHeapUsage --no-cache empty-tests-jest

# for Chromium inspection at chrome://inspect/#devices
PRISMA_CLIENT_ENGINE_TYPE=library node --inspect-brk --expose-gc ./node_modules/jest/bin/jest.js --runInBand --logHeapUsage --no-cache empty-tests-jest

I used latest v16

node -v
v16.14.0

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.

None yet

1 participant