diff --git a/.testcoverage.example.yml b/.testcoverage.example.yml index 32f82a3..1292f48 100644 --- a/.testcoverage.example.yml +++ b/.testcoverage.example.yml @@ -60,7 +60,7 @@ diff: # Allowed threshold for the test coverage difference (in percentage) # between the feature branch and the base branch. # - # By default, this is disabled (set to nil). Valid values range from + # By default, this is disabled (set to null). Valid values range from # -100.0 to +100.0. # # Example: @@ -68,4 +68,4 @@ diff: # less than 0.5% more coverage than the base. # # If set to -0.5, the check allows up to 0.5% less coverage than the base. - threshold: nil \ No newline at end of file + threshold: null \ No newline at end of file diff --git a/pkg/testcoverage/config_test.go b/pkg/testcoverage/config_test.go index 3bf8f28..5bb3b55 100644 --- a/pkg/testcoverage/config_test.go +++ b/pkg/testcoverage/config_test.go @@ -213,6 +213,15 @@ func Test_ConfigFromFile(t *testing.T) { assert.NoError(t, err) assert.Equal(t, savedCfg, cfg) }) + + t.Run("example file", func(t *testing.T) { + t.Parallel() + + cfg := Config{} + filename := "../../.testcoverage.example.yml" + err := ConfigFromFile(&cfg, filename) + assert.NoError(t, err) + }) } func TestConfigYamlParse(t *testing.T) {