Ship test-runner helpers for Vitest, Jest and `node:test`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.6k
- Forks
- 274
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 44
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de testcontainers/testcontainers-node
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
testcontainers/testcontainers-node#1539 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testcontainers/testcontainers-node#1533 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
testcontainers/testcontainers-node#1531 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
testcontainers/testcontainers-node#1529 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
testcontainers/testcontainers-node#1528 ·
Los mantenedores suelen responder en 1 día
Todos los issues de testcontainers/testcontainers-node
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
better-auth/better-auth#11723 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
area: docs difficulty: easy documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden abPosiblemente ocupada @KajoVanBuyten la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
AgentSystemLabs/agent-office#367 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pierrecomputer/pierre#1187 ·
Los mantenedores suelen responder en 1 día
-
area: frontend bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
snapotter-hq/SnapOtter#2425 ·
Los mantenedores suelen responder en 1 día