Skip to content

Tests in test/commands.shard/hermetic/config_test.dart make assertions against globals.analytics without actually injecting a value #162413

@andrewkolos

Description

@andrewkolos

Example:

expect(fakeAnalytics.sentEvents, isEmpty);
},
overrides: <Type, Generator>{Usage: () => testUsage},
);

Notice we make an assertion against fakeAnalytics. If you view the full test code, you see this value is never injected into any object (or the context global via testUsingContext's overrides parameter).

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions