jest how set file pattern in package.json script
问题 I have in packadge.json "scripts": { "test": "cross-env NODE_ENV=test jest" }, I want to test all files match pattern front/**/*.test.js but if "scripts": { "test": "cross-env NODE_ENV=test jest \"front/**/*.test.js\"" }, I've got an error Invalid testPattern front/**/*.test.js supplied. Running all tests instead. So, how could I pass file names pattern to jest? Thanks. 回答1: According to the documentation you are supposed to use a regex for your pattern. So in your case you probably would