const context = require.context('./components', true, /\.(js|ts|tsx)$/);
context.keys().forEach(context);

const context = require.context('./components', true, /\.spec\.js$/);
context.keys().forEach(context);

change app.spec.js to require only .spec.js files