我怎么保存
*.spec.js*
和
*.test.js*
文件来自
/lib
目录?
我觉得也许我错过了一些非常愚蠢的设置笑话测试。我把测试放在
/src
喜欢
the docs indicate
并且是典型的Jest测试,但是执行构建会将测试文件复制到
/LIB
目录。
我一直在寻找方法来克服这种行为,但在
electrode-archetype-react-app/arch-clap.js
阻止对此进行任何配置。
"build-lib:client": {
desc: false,
dep: [
".clean.lib:client",
".mk.lib.client.dir",
".build.client.babelrc"
],
task: mkCmd(`babel`,
`--source-maps=inline
--copy-files
--out-dir ${AppMode.lib.client}`,
`${AppMode.src.client}` )
}
我制作了一个小的演示程序来说明这一点。
https://github.com/snekse/electrode-jest-build-config-example
切换到正确的分支
git checkout electrode-jest-docs-issue
建立项目
yarn install && yarn cleanBuild
检查/lib中的测试/规范文件
yarn hasLibTest