Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Custom parallel execution and BDD cause tests to be duplicated

Aperta
#5,725 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
testing-qa

Direzione di ricerca

Reproduce the duplication with the linked codeceptjs-parallel-bdd project and inspect how BDD tests are added to mocha.suite.tests during the custom parallel run. Start around _beforeSuite and the parallel test setup; done means the expected 7 tests run once, without the duplicate test names warning.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Running BDD tests from a custom parallel runner runs them twice. Not-BDD tests are properly run only once.

When tests are started with that setup, I receive the following warning on startup:
[Worker 01] Duplicate test names detected - Feature + Scenario name should be unique:

The problem seems to be that BDD tests are added twice to mocha.suite.tests, as removing duplicates from there in _beforeSuite results in BDD tests being correctly run only once.

I created a project showcasing that behavior https://github.com/al-bre/codeceptjs-parallel-bdd . I expect 7 tests in total to be executed when running in parallel mode, but instead the result is
OK | 12 passed // 10s

Lingua principale
JavaScript
Stelle
4.2k
Fork
756
Merge medio
1g 8h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeceptjs/CodeceptJS

Tutte le issue di codeceptjs/CodeceptJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.