Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Correct async testing #1

Merged
merged 2 commits into from

2 participants

@chrisbu

Now the test won't finish until the async code has finished executing

chrisbu added some commits
@chrisbu chrisbu Correct async testing
Now the test won't finish until the async code has finished executing
5f6b7a5
@chrisbu chrisbu Update dartminer.dart 4981ead
@travist
Owner

Thanks man!

@travist travist merged commit 03d060a into travist:master
@travist
Owner

FYI... I am now working on getting this working with getblocktemplate, but that is proving to be not as performant... working on it so stay tuned. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 22, 2014
  1. @chrisbu

    Correct async testing

    chrisbu authored
    Now the test won't finish until the async code has finished executing
  2. @chrisbu

    Update dartminer.dart

    chrisbu authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/dartminer.dart
View
4 test/dartminer.dart
@@ -7,7 +7,7 @@ void main() {
test('Test Mining', () {
// Get the work.
- getJSON('getwork.json').then((dynamic work) {
+ getJSON('getwork.json').then(expectAsync((dynamic work) {
// Create the miner.
Miner miner = new Miner(work);
@@ -21,6 +21,6 @@ void main() {
// Print the result.
print(result);
expect(result, '01000000378da709d01338204d85458bcd0f4751dfd688b56e94beab7e20ad920000000002aea838751547f70c0d12aa880ca185ad98136af5ad1f8220374c128577b60c8703064ef8ff071d352e9531800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000280');
- });
+ }));
});
}
Something went wrong with that request. Please try again.