YAMLResume

测试

为了拥有流畅的开发体验,拥有可靠的测试策略非常重要。这包括单元测试、集成测试和端到端测试,以确保应用程序的所有方面都按预期运行。

单元测试

您可以使用以下命令运行单元测试:

# run tests for yamlresume/cli package
pnpm cli test

# run tests for yamlresume/core package
pnpm core test

# run tests for all packages
pnpm test

如果您正在开发新功能,可以在文件变化时运行测试:

# watch and test for changes in yamlresume/cli package
pnpm cli test:watch

# watch and test for changes in yamlresume/core package
pnpm core test:watch

# watch and test for changes in all packages
pnpm test:watch

如果您正在开发依赖于 yamlresume/core 包的 CLI 功能,不要忘记构建 yamlresume/core 包。

测试覆盖率

YAMLResume 保持 100% 单元测试覆盖率 以追求高代码质量并防止回归。您可以通过运行以下命令检查测试覆盖率报告:

# check test coverage for yamlresume/cli package
pnpm cli test:cov

# check test coverage for yamlresume/core package
pnpm core test:cov

# check test coverage for all packages
pnpm test:cov
Edit on GitHub

Last updated on