我开始使用jest为旧产品编写测试。在目录深处的某些地方是.snap文件与jest无关。但是我的jest测试运行失败,因为jest找到了这些文件:
jest -- __tests__
PASS __tests__/userPreferences.test.js
PASS __tests__/hierachyCollapse.test.js
Snapshot Summary
› 35 obsolete snapshot files found, run with `npm test -- -u` to remove them..
Test Suites: 2 passed, 2 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: 1.556s
Ran all test suites matching /__tests__/i.
npm ERR! Test failed. See above for more details.
我如何告诉jest在测试 / 快照中寻找快照?
我找到了this github issue,但这似乎并不适合我的问题。