forked from firka/flutter
Handle missing flutter_test dependency cleanly (#7421)
We now produce a more reasonable error message when we're missing the flutter_test dependency in a test. Also, remove the flutter_tools stack traces when the engine dies. Fixes #6187
This commit is contained in:
9
dev/missing_dependency_tests/.gitignore
vendored
Normal file
9
dev/missing_dependency_tests/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
.atom
|
||||
.DS_Store
|
||||
.buildlog
|
||||
.idea
|
||||
.packages
|
||||
.pub/
|
||||
build/
|
||||
packages
|
||||
pubspec.lock
|
||||
4
dev/missing_dependency_tests/pubspec.yaml
Normal file
4
dev/missing_dependency_tests/pubspec.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
name: missing_dependency_tests
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
4
dev/missing_dependency_tests/trivial_expectation.txt
Normal file
4
dev/missing_dependency_tests/trivial_expectation.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
<<skip until matching line>>
|
||||
<<stderr>>
|
||||
<<skip until matching line>>
|
||||
Failed to load test harness\. +Are you missing a dependency on flutter_test\?
|
||||
11
dev/missing_dependency_tests/trivial_test.dart
Normal file
11
dev/missing_dependency_tests/trivial_test.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('Trival test', () {
|
||||
expect(42, 42);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user