Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Testing framework feedback and improvements

Abierto
#1,663 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
testing-qa

Línea de trabajo

Start by locating the current testing framework and the testenv.exec entry point, then compare how handlers and filters are tested today. Done should include a decided design and tests covering handler hit counts, event order and input assertions, deletion, and intermediate results.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The current testing framework is a good step to being able to check a handlers and filters but has some limitations. Based on feedback we can make improvements to give more control over tests

Example:
import {xxx_event_handler} from '../src/';

it('test XXX event handler for block #123', async () => {
    store = Mock.fn();...
    // blockheight, handler_name, injection, callback
    await testenv.exec(1234, 'xxx_event_handler', {store}, (data) => {
        // assert data.length, how many times it is expected to be hit at this height
        // loop data element, assert content/order of the matching events
        // invoke real handler
        for (const evt of data) {
            await xxx_event_handler(evt);
            // write store asserts
        }
    })
}); 
Advantages:
  • more assertions than the store output, e.g
    • times the handler is hit in the given height
    • order of events hitting the given handler
    • assert the input of the handler
  • assert deletion
  • assert intermediate results
Lenguaje dominante
TypeScript
Estrellas
18.7k
Forks
396
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de subquery/subql

Todos los issues de subquery/subql

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.