Skip to content

Add diffTolerance parameter to matchesGolden #76337

@CaseyHillers

Description

@CaseyHillers

Currently, the goldens tests will fail if there is any pixel difference. I'd like to be able to pass a tolerance in via matchesGolden and have it be used by the comparator.

Example:

matchesGoldenFile(goldenPath, diffTolerance: 0.01)

\cc @Piinks

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions