yarn test如果你的包里有一个定义好的 对象,这个命令会运行指定的 test 脚本。 并且下面是你 package.json 里的: yarn run testyarn test 也是 的快捷命令。