Skip to content

Add code coverage tool#9

Merged
fallenwood merged 3 commits into
masterfrom
coverage
Jan 30, 2026
Merged

Add code coverage tool#9
fallenwood merged 3 commits into
masterfrom
coverage

Conversation

@fallenwood

@fallenwood fallenwood commented Jan 30, 2026

Copy link
Copy Markdown
Owner

This pull request adds comprehensive new test coverage for core features, built-in functions, and built-in tests in the MiniJinja project. It introduces three new test files, each focused on a different aspect of the library, and updates the test project to support code coverage analysis.

New test coverage and code coverage tooling:

Test coverage for built-in functions:

  • Added tests/BuiltinFunctionsTests.cs with tests for functions such as range, lipsum, cycler, joiner, namespace, dict, and debug, ensuring correct behavior and error handling for each.

Test coverage for built-in tests:

  • Added tests/BuiltinTestsTests.cs to verify all built-in tests (like none, true, odd, even, number, string, sequence, mapping, iterable, eq, lt, gt, in, lower, upper, startingwith, endingwith, truthy, falsy, sameas) and support for custom tests, including error cases and argument validation.

Test coverage for environment and extensibility:

  • Added tests/EnvironmentTests.cs to test environment features such as template management, globals, filters, tests, functions, disposal, and template rendering with various context types.

Test project and tooling improvements:

  • Added the coverlet.collector NuGet package to both tests/tests.csproj and Directory.Packages.props to enable code coverage collection during test runs. [1] [2]

@fallenwood fallenwood merged commit 3237d8e into master Jan 30, 2026
1 check passed
@fallenwood fallenwood deleted the coverage branch January 30, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant