I have a mocha test with many imports , those imports make the test time very long (I tried a dummy test without any imports and it took only few seconds)
Here is the structure of my test - TestSpeed.test.js
import {expect} from 'chai';
// many other imports ..
describe('Test Speed', () => {
it('Test Speed 1 equals to 1', () => {
expect(1).to.eql(1);
});
});
And I'm running it with the command - node mocha TestSpeed.test.js.
Is there any way to keep those imports in a cache and make the test faster? Any other idea how to make the test faster would be acceptable too.