Skip to content

it.Fail(...)..Contain(...) does not return actual value #15

@fogfish

Description

@fogfish
t.Run("Corrupted", func(t *testing.T) {
		it.Then(t).Should(
			it.Fail(
				func() error {
					return json.Unmarshal([]byte(geometryCorrupted), geo)
				},
			).Contain("type Unknown is not supported as GeoJSON Point"),
		)
	})

fails with

--- FAIL: TestGeometryPoint (0.00s)
    --- FAIL: TestGeometryPoint/Corrupted (0.00s)
        geometry_test.go:185: should github.com/fogfish/geojson_test.TestGeometryPoint.func3.1 return error contain type Unknown is not supported as GeoJSON Point

it is expected that actual error value is returned

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions