Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 47793003: Control whether pub build and serve minify or not. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: sdk/lib/_internal/pub/test/test_pub.dart
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index 04ad649eafedf4c5bc8e4e74518c6f257b92b493..5da6eb62a3931ad7435b5e88d96068faea8fda38 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -56,6 +56,16 @@ final _requestedPaths = <String>[];
/// The cached value for [_portCompleter].
Completer<int> _portCompleterCache;
+/// A [Matcher] that matches JavaScript generated by dart2js with minification
+/// enabled.
+Matcher isMinifiedDart2JSOutput =
+ isNot(contains("// The code supports the following hooks"));
+
+/// A [Matcher] that matches JavaScript generated by dart2js with minification
+/// disabled.
+Matcher isUnminifiedDart2JSOutput =
+ contains("// The code supports the following hooks");
+
/// The completer for [port].
Completer<int> get _portCompleter {
if (_portCompleterCache != null) return _portCompleterCache;

Powered by Google App Engine