Skip to content

feat: "--dart-define" option in test  #91

Description

@SuhwanCha

flutter/flutter#34505

import 'package:flutter/foundation.dart';

String foo() {
  if (kReleaseMode) {
    return null;
  }
  return _calculateABunchOfStuffAndReturnALongString();
}

To cover source code above, --dart-define option is needed.

For example, to testing device in release mode,

flutter test --dart-define=dart.vm.product=true

Metadata

Metadata

Assignees

Labels

featureA new feature or requestgood first issueGood for newcomersp2Important issues not at the top of the work list

Type

No type

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions