I have a test file with a number of tests and a utility function exported
export function createObjects(){
const numObjects = 100;
const objects = [];
for (let i = 1; i < numObjects + 1; i++) {
objects.push(i);
}
return objects
}
describe('Test describe', () => {
it('Test', () => {
})
})
I am trying to import the createObjects function in another test. However when I import the function like below in the second test
import {createObjects} from './TestOne'
It runs the entire test suite. Any idea why this happens?
I'm using jest 24.9.0