Testing framework feedback and improvements
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 18.7k
- Fork
- 396
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di subquery/subql
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Improve project validationAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Tutte le issue di subquery/subql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
diegosouzapw/OmniRoute#14869 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
I maintainer di solito rispondono entro 1 giorno
-
status: waiting triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
freeCodeCamp/freeCodeCamp#70412 ·
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
opensearch-project/OpenSearch-Dashboards#12816 ·
I maintainer di solito rispondono entro 1 giorno