Closed
Description
Is this a bug report?
No, it's a question.
The Question: How to speed up Jest?
Tests are running at a very slow pace
I currently have only three tests: Two tests that validate the initial state of my app, plus the default 'renders without crashing'
test that comes with CRA.
My other tests look like so:
import { AppState } from '../State/AppState';
describe("store", () => {
const store = new AppState();
it("initializes with default variableX", () => {
expect(store.quote.variableX).toBe("SomeService");
})
it("cannot have variableZ without a defined variableX and variableY", () => {
// (...)
})
})
It takes 11.30 seconds (not ms) to run these tests. If I just test with the default CRA test it takes around 8 - 9 seconds.
What gives? How can I make tests run faster?
Metadata
Metadata
Assignees
Labels
No labels