-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update readme to document build and serve feature #30
Conversation
webdev/test/readme_test.dart
Outdated
@@ -0,0 +1,34 @@ | |||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2018
webdev/test/test_utils.dart
Outdated
@@ -0,0 +1,18 @@ | |||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2018
Usage: webdev build [arguments] | ||
-h, --help Print this usage information. | ||
-r, --[no-]release Build with release mode defaults for builders. | ||
(defaults to on) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "on"?
And where are you setting this default? Was that in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, found the other PR...
@natebosch – fixed dates – although I zero epsilon chance it'd cause any issues... |
webdev/test/readme_test.dart
Outdated
|
||
try { | ||
expect(readme.readAsStringSync(), contains(expected)); | ||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
printOnFailure(expected);
expect(readme.readAsStringSync(), contains(expected));
Nooice!
…On Mon, Apr 9, 2018 at 12:20 PM Nate Bosch ***@***.***> wrote:
***@***.**** approved this pull request.
------------------------------
In webdev/test/readme_test.dart
<#30 (comment)>:
> + test('help serve', () => _readmeCheck(['help', 'serve']));
+}
+
+Future _readmeCheck(List<String> args) async {
+ var process = await runWebDev(args);
+ var output = (await process.stdoutStream().join('\n')).trim();
+ await process.shouldExit(0);
+
+ var readme = new File('README.md');
+
+ var command = (['webdev']..addAll(args)).join(' ');
+ var expected = '```console\n\$ $command\n$output\n```';
+
+ try {
+ expect(readme.readAsStringSync(), contains(expected));
+ } catch (e) {
How about
printOnFailure(expected);expect(readme.readAsStringSync(), contains(expected));
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCiv5pBLRHjysRiokHSucMB-oyHzz4ks5tm7SQgaJpZM4TM_3U>
.
|
No description provided.