Modül testlerine güzelce ayrılmış ardışık çalışmayı sağlamak benim için çalıştı:
1) Testleri spec/testadlandırma olmadan ayrı dosyalarda tutun .
|__testsToRunSequentially.test.js
|__tests
|__testSuite1.js
|__testSuite2.js
|__index.js
2) Test takımına sahip dosya da şöyle görünmelidir (testSuite1.js):
export const testSuite1 = () => describe(/*your suite inside*/)
3) Bunları içeri aktarın testToRunSequentially.test.jsve şunlarla çalıştırın --runInBand:
import { testSuite1, testSuite2 } from './tests'
describe('sequentially run tests', () => {
testSuite1()
testSuite2()
})
npm test --runInBand? Offtopic: "Band" adının nereden geldiğinden emin değilim. --runSequentially muhtemelen daha mantıklı olurdu :)