-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
See title. If you run a test that has a failing throwsToolExit matcher, you may see output similar to this:
Expected: throws (<Instance of 'ToolExit'> and satisfies function)
Actual: <Instance of 'Future<void>'>
Which: threw ToolExit:<Exception: Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command.>
stack package:flutter_tools/src/base/common.dart 10:3 throwToolExit
package:flutter_tools/src/commands/assemble.dart 294:7 AssembleCommand.runCommand
...
While there is no useful information about the mismatch, this is generally still sufficient--there are only two fields throwsToolExit can match on.
However, where this can be confusing when writing tests that involve multiple throwsToolExit matchers, because it isn't necessarily easy to figure out in which the mismatch occurred, especially if the stack traces are long enough to get truncated. This is a situation that should ideally be rare, but I've encountered a couple of times now.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team