,
myFolder
│ myFile1.js
│ myFile2.js
│ ...
│
└───__tests__
myFile1.spec.js
myFile2.spec.js
...
jest.config.js testMatch:
testMatch: ['**/__tests__/*.js?(x)'],
jest.config.js:
const jestConfig = {
verbose: true,
testURL: "http://localhost/",
'transform': {
'^.+\\.jsx?$': 'babel-jest',
},
testMatch: ['**/__tests__/*.js?(x)'],
}
module.exports = jestConfig