Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/very_good_test_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: "3.44.x"
flutter_version: "3.47.x"
19 changes: 9 additions & 10 deletions lib/src/very_good_test_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import 'package:universal_io/io.dart';
import 'package:very_good_test_runner/very_good_test_runner.dart';

/// Signature for `Process.start`.
typedef StartProcess =
Future<Process> Function(
String executable,
List<String> arguments, {
String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment,
bool runInShell,
ProcessStartMode mode,
});
typedef StartProcess = Future<Process> Function(
String executable,
List<String> arguments, {
String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment,
bool runInShell,
ProcessStartMode mode,
});

/// Runs `dart test` and returns a stream of [TestEvent]
/// reported by the process.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://github.com/VeryGoodOpenSource/very_good_test_runner
version: 0.4.0

environment:
sdk: ^3.12.0
sdk: ^3.13.0

dependencies:
json_annotation: ^4.9.0
Expand Down
6 changes: 2 additions & 4 deletions test/src/models/test_event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ void main() {
test('returns ErrorTestEvent when type is error', () {
final json = {
'testID': 8,
'error':
'''Test failed. See exception logs above.\nThe test description was: renders CounterPage''',
'error': '''Test failed. See exception logs above.\nThe test description was: renders CounterPage''',
'stackTrace': '',
'isFailure': false,
'type': 'error',
Expand All @@ -103,8 +102,7 @@ void main() {
final json = {
'testID': 8,
'messageType': 'print',
'message':
'''══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: no matching nodes in the widget tree\n Actual: _WidgetTypeFinder:<exactly one widget with type 'CounterPage' (ignoring offstage widgets):\nCounterPage>\n Which: means one was found but none were expected\n\nWhen the exception was thrown, this was the stack:\n#4 main.<anonymous closure>.<anonymous closure> (file:///example/test/app/view/app_test.dart:16:7)\n<asynchronous suspension>\n<asynchronous suspension>\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n file:///example/test/app/view/app_test.dart line 16\nThe test description was:\n renders CounterPage\n════════════════════════════════════════════════════════════════════════════════════════════════════''',
'message': '''══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: no matching nodes in the widget tree\n Actual: _WidgetTypeFinder:<exactly one widget with type 'CounterPage' (ignoring offstage widgets):\nCounterPage>\n Which: means one was found but none were expected\n\nWhen the exception was thrown, this was the stack:\n#4 main.<anonymous closure>.<anonymous closure> (file:///example/test/app/view/app_test.dart:16:7)\n<asynchronous suspension>\n<asynchronous suspension>\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n file:///example/test/app/view/app_test.dart line 16\nThe test description was:\n renders CounterPage\n════════════════════════════════════════════════════════════════════════════════════════════════════''',
'type': 'print',
'time': 3284,
};
Expand Down
72 changes: 24 additions & 48 deletions test/src/very_good_test_runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ void main() {
{
'test': {
'id': 1,
'name':
'loading very_good_test_runner/test/src/models/test_event_test.dart',
'name': 'loading very_good_test_runner/test/src/models/test_event_test.dart',
'suiteID': 0,
'groupIDs': <int>[],
'metadata': {'skip': false, 'skipReason': null},
Expand All @@ -297,8 +296,7 @@ void main() {
{
'test': {
'id': 3,
'name':
'loading very_good_test_runner/test/src/flutter_test_runner_test.dart',
'name': 'loading very_good_test_runner/test/src/flutter_test_runner_test.dart',
'suiteID': 2,
'groupIDs': <int>[],
'metadata': {'skip': false, 'skipReason': null},
Expand Down Expand Up @@ -343,8 +341,7 @@ void main() {
'testCount': 11,
'line': 5,
'column': 3,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'group',
'time': 1066,
Expand All @@ -359,24 +356,21 @@ void main() {
'testCount': 11,
'line': 6,
'column': 5,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'group',
'time': 1067,
},
{
'test': {
'id': 7,
'name':
'''TestEvent fromJson throws UnsupportedError when object is not a supported test event''',
'name': '''TestEvent fromJson throws UnsupportedError when object is not a supported test event''',
'suiteID': 0,
'groupIDs': [4, 5, 6],
'metadata': {'skip': false, 'skipReason': null},
'line': 7,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1067,
Expand Down Expand Up @@ -414,8 +408,7 @@ void main() {
'testCount': 3,
'line': 27,
'column': 3,
'url':
'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
'url': 'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
},
'type': 'group',
'time': 1074,
Expand All @@ -429,8 +422,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 53,
'column': 5,
'url':
'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
'url': 'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
},
'type': 'testStart',
'time': 1075,
Expand All @@ -453,8 +445,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 20,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1125,
Expand All @@ -477,8 +468,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 31,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1133,
Expand All @@ -501,8 +491,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 44,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1139,
Expand All @@ -518,15 +507,13 @@ void main() {
{
'test': {
'id': 14,
'name':
'''TestEvent fromJson returns TestStartEvent when type is testStart''',
'name': '''TestEvent fromJson returns TestStartEvent when type is testStart''',
'suiteID': 0,
'groupIDs': [4, 5, 6],
'metadata': {'skip': false, 'skipReason': null},
'line': 64,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1148,
Expand All @@ -542,15 +529,13 @@ void main() {
{
'test': {
'id': 15,
'name':
'''TestEvent fromJson returns AllSuitesTestEvent when type is allSuites''',
'name': '''TestEvent fromJson returns AllSuitesTestEvent when type is allSuites''',
'suiteID': 0,
'groupIDs': [4, 5, 6],
'metadata': {'skip': false, 'skipReason': null},
'line': 83,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1155,
Expand All @@ -573,8 +558,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 89,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1160,
Expand All @@ -590,15 +574,13 @@ void main() {
{
'test': {
'id': 17,
'name':
'''TestEvent fromJson returns MessageTestEvent when type is print''',
'name': '''TestEvent fromJson returns MessageTestEvent when type is print''',
'suiteID': 0,
'groupIDs': [4, 5, 6],
'metadata': {'skip': false, 'skipReason': null},
'line': 103,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1168,
Expand All @@ -621,8 +603,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 116,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1176,
Expand All @@ -644,8 +625,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 81,
'column': 5,
'url':
'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
'url': 'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
},
'type': 'testStart',
'time': 1179,
Expand All @@ -661,15 +641,13 @@ void main() {
{
'test': {
'id': 20,
'name':
'''TestEvent fromJson returns TestDoneEvent when type is testDone''',
'name': '''TestEvent fromJson returns TestDoneEvent when type is testDone''',
'suiteID': 0,
'groupIDs': [4, 5, 6],
'metadata': {'skip': false, 'skipReason': null},
'line': 128,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1184,
Expand All @@ -691,8 +669,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 94,
'column': 5,
'url':
'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
'url': 'file://very_good_test_runner/test/src/flutter_test_runner_test.dart',
},
'type': 'testStart',
'time': 1192,
Expand All @@ -715,8 +692,7 @@ void main() {
'metadata': {'skip': false, 'skipReason': null},
'line': 141,
'column': 7,
'url':
'file://very_good_test_runner/test/src/models/test_event_test.dart',
'url': 'file://very_good_test_runner/test/src/models/test_event_test.dart',
},
'type': 'testStart',
'time': 1194,
Expand Down