Index: packages/stack_trace/test/chain/vm_test.dart |
diff --git a/packages/stack_trace/test/chain/vm_test.dart b/packages/stack_trace/test/chain/vm_test.dart |
index 70635b7540f0be7b3053e8a4163a4e5c148ae7dc..daf7f8f114390bf33976311e307cb939c48b9d1e 100644 |
--- a/packages/stack_trace/test/chain/vm_test.dart |
+++ b/packages/stack_trace/test/chain/vm_test.dart |
@@ -17,11 +17,10 @@ import 'utils.dart'; |
void main() { |
group('capture() with onError catches exceptions', () { |
test('thrown synchronously', () { |
- return captureFuture(() => throw 'error') |
- .then((chain) { |
+ return captureFuture(() => throw 'error').then((chain) { |
expect(chain.traces, hasLength(1)); |
- expect(chain.traces.single.frames.first, |
- frameMember(startsWith('main'))); |
+ expect( |
+ chain.traces.single.frames.first, frameMember(startsWith('main'))); |
}); |
}); |
@@ -349,11 +348,11 @@ void main() { |
}); |
}); |
- test('current() outside of capture() returns a chain wrapping the current ' |
+ test( |
+ 'current() outside of capture() returns a chain wrapping the current ' |
'trace', () { |
- // The test runner runs all tests with chains enabled, so to test without we |
- // have to do some zone munging. |
- return runZoned(() { |
+ // The test runner runs all tests with chains enabled. |
+ return Chain.disable(() { |
var completer = new Completer(); |
inMicrotask(() => completer.complete(new Chain.current())); |
@@ -362,10 +361,10 @@ void main() { |
// chain isn't available and it just returns the current stack when |
// called. |
expect(chain.traces, hasLength(1)); |
- expect(chain.traces.first.frames.first, |
- frameMember(startsWith('main'))); |
+ expect( |
+ chain.traces.first.frames.first, frameMember(startsWith('main'))); |
}); |
- }, zoneValues: {#stack_trace.stack_zone.spec: null}); |
+ }); |
}); |
group('forTrace() within capture()', () { |
@@ -411,7 +410,8 @@ void main() { |
}); |
}); |
- test('called for a stack trace from a nested series of asynchronous ' |
+ test( |
+ 'called for a stack trace from a nested series of asynchronous ' |
'operations', () { |
return Chain.capture(() { |
return chainForTrace((callback) { |
@@ -444,7 +444,8 @@ void main() { |
}); |
}); |
- test('called for an unregistered stack trace returns a chain wrapping that ' |
+ test( |
+ 'called for an unregistered stack trace returns a chain wrapping that ' |
'trace', () { |
var trace; |
var chain = Chain.capture(() { |
@@ -462,7 +463,8 @@ void main() { |
}); |
}); |
- test('forTrace() outside of capture() returns a chain wrapping the given ' |
+ test( |
+ 'forTrace() outside of capture() returns a chain wrapping the given ' |
'trace', () { |
var trace; |
var chain = Chain.capture(() { |