Skip to content
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

Load Exception #682

Merged
merged 2 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.12.24+5

* Expose a way for tests to forward a `loadException` to the server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're exposing a new feature, this should bump the minor version to 0.12.25. It should also describe how tests can forward load exceptions both here and in either the README or the API docs.

If it's not a user-visible feature, the CHANGELOG should just say "no user-visible changes".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. This is a non user-visible feature.


## 0.12.24+4

* Drain browser process `stdout` and `stdin`. This resolves test flakiness, especially in Travis
Expand Down
5 changes: 5 additions & 0 deletions lib/dart.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ var sendLoadException = function(message) {
}, window.location.origin);
}

// Listen for loadException events and forward to the server.
window.addEventListener('loadException', function(e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consider something a bit more specific like dartTestLoadException or similar, since this is on the global window object you may run into conflicts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to dartLoadException given that this logic can reside outside of tests.

sendLoadException(e.detail);
});

// The basename of the current page.
var name = window.location.href.replace(/.*\//, '').replace(/#.*/, '');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test
version: 0.12.24+4
version: 0.12.24+5
author: Dart Team <[email protected]>
description: A library for writing dart unit tests.
homepage: https://github.com/dart-lang/test
Expand Down