Test
To have a smooth development experience, it is important to have a solid testing strategy in place. This includes unit tests, integration tests, and end-to-end tests to ensure that all aspects of the application are functioning as expected.
Unit Test
You can run unit tests using the following command:
# run tests for selected packages
pnpm cli test
pnpm core test
pnpm node test
pnpm playground test
# run tests for all packages
pnpm testThe same root shortcuts are available for ai, samples,
create-yamlresume, and json2yamlresume. You can also target any package with
pnpm directly, for example pnpm --filter @yamlresume/node test.
If you're working on a new feature, you can run tests on file changes:
# 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:watchThe CLI is a thin wrapper around @yamlresume/node, which in turn uses
@yamlresume/core, @yamlresume/samples, and @yamlresume/ai. If you change
one of those dependencies, build it before exercising the CLI, or run
pnpm build:watch from the repository root.
Test Coverage
YAMLResume keeps a 100% unit test coverage in order to pursue high code quality and prevent regressions. You can check the test coverage report by running:
# 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:covLast updated on