Skip to content

Commit 59e73ff

Browse files
author
Anna Gringauze
authored
Fix test break due to changed compiler error, do not use pub directly (#1397)
1 parent b197872 commit 59e73ff

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

dwds/test/build_daemon_evaluate_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,8 @@ void main() async {
503503

504504
expect(
505505
error,
506-
isA<ErrorRef>().having(
507-
(instance) => instance.message,
508-
'message',
509-
matches('CompilationError: Getter not found:.*typo')));
506+
isA<ErrorRef>().having((instance) => instance.message,
507+
'message', contains('CompilationError:')));
510508
});
511509
});
512510

dwds/test/fixtures/context.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import 'logging.dart';
3131
import 'server.dart';
3232
import 'utilities.dart';
3333

34-
final _batExt = Platform.isWindows ? '.bat' : '';
3534
final _exeExt = Platform.isWindows ? '.exe' : '';
3635

3736
const isRPCError = TypeMatcher<RPCError>();
@@ -171,7 +170,7 @@ class TestContext {
171170
'Could not start ChromeDriver. Is it installed?\nError: $e');
172171
}
173172

174-
await Process.run('pub$_batExt', ['upgrade'],
173+
await Process.run(dartPath, ['pub', 'upgrade'],
175174
workingDirectory: workingDirectory);
176175

177176
ExpressionCompiler expressionCompiler;

dwds/test/frontend_server_evaluate_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ void main() async {
410410
const TypeMatcher<ErrorRef>().having(
411411
(instance) => instance.message,
412412
'message',
413-
'CompilationError: Getter not found: \'typo\'.\ntypo\n^^^^'));
413+
contains('CompilationError:')));
414414
});
415415
});
416416
});

0 commit comments

Comments
 (0)