Ship test-runner helpers for Vitest, Jest and `node:test`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, node.js, typescript
調査の方向性
Start by reading the global setup documentation and the existing package layouts under packages/, especially the Java and .NET test runner integrations mentioned in the issue. Then compare how Vitest, Jest, and node:test expose setup, lifecycle, and per-test context APIs. Done means optional packages provide the proposed container declaration and test helpers for all three runners, while respecting that global setup can pass only serialisable connection details.
索引モデルが issue の本文から書いたものです。
説明
What happens
Using a container from a test runner is wired by hand each time. The global setup page in the docs shows the pattern for one shared container:
- a setup file that starts the container and stores it in a module variable
project.provide("redisUrl", ...)andinject("redisUrl")to pass a serialisable value to the tests- a teardown export that stops it
- a config entry pointing at the setup file
Per-file and per-test containers need their own beforeAll/afterAll pairs or await using.
Expected
Small optional packages that turn this into a declaration, for example for Vitest:
// vitest.setup.ts
export default defineContainers({
redis: () => new RedisContainer("redis:8"),
});
// some.test.ts
const test = withContainers<typeof containers>();
test("stores a value", async ({ redis }) => {
/* redis.connectionUrl */
});
with equivalents for Jest and node:test.
Where
New packages under packages/, outside packages/testcontainers and packages/modules.
Notes
- Java ships
junit-jupiterandspockintegration modules. .NET ships xUnit packages. - A global setup runs in a different process from the tests, so only serialisable connection details can cross. That shapes the API.
- Independent of the core API work.
Dependencies
- Nothing blocks this. It can start now.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 274
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 44
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
homarr-labs/homarr#7191 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AvaProtocol/ava-sdk-js#276 ·
メンテナーはふだん 1 日以内に返信
-
useFragment does not require `variables` when the fragment's variables type has required fieldsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apollographql/apollo-client#13493 ·
メンテナーはふだん 1 日以内に返信