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

Boilerplate for integration tests (within js-sdk) #519

Merged
merged 10 commits into from
Jan 18, 2025

Conversation

0div
Copy link
Contributor

@0div 0div commented Dec 23, 2024

Description

  • nextjs integration test template
  • pnpm test:integration
  • set of stress tests
  • adapt vitest workspace

Copy link

linear bot commented Dec 23, 2024

Copy link

changeset-bot bot commented Dec 23, 2024

⚠️ No Changeset found

Latest commit: 5c4207b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ValentaTomas ValentaTomas added the Improvement Improvement for current functionality label Jan 7, 2025
@0div 0div marked this pull request as ready for review January 16, 2025 23:19
packages/js-sdk/tests/setup.ts Outdated Show resolved Hide resolved
@@ -35,7 +35,8 @@
"update-deps": "ncu -u && pnpm i",
"postPublish": "./scripts/post-publish.sh || true",
"test:bun": "bun test tests/runtimes/bun --env-file=.env",
"test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks"
"test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks",
"test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**"
Copy link
Member

Choose a reason for hiding this comment

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

can we do it only based on directory structure? 🙏

Copy link
Contributor Author

@0div 0div Jan 17, 2025

Choose a reason for hiding this comment

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

IIRC, I initially tried that, but the way vitest workspace works makes it impossible to exclude the integration tests when when running pnpm test , bc that just picks up everything — maybe i'm missing something tho!

packages/js-sdk/tests/integration/template/e2b.Dockerfile Outdated Show resolved Hide resolved
packages/js-sdk/tests/integration/stress.test.ts Outdated Show resolved Hide resolved
packages/js-sdk/tests/integration/stress.test.ts Outdated Show resolved Hide resolved
@0div 0div requested a review from jakubno January 17, 2025 04:17
@jakubno jakubno self-assigned this Jan 17, 2025
@0div 0div merged commit 7beccd7 into main Jan 18, 2025
2 checks passed
@0div 0div deleted the create-stress-test-e2b-1360 branch January 18, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improvement for current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants