@@ -26,20 +26,16 @@ bool _isCurrentTestAsync;
2626bool _inIt = false ;
2727
2828class AsyncTestCompleter {
29- Completer _completer;
29+ final _completer = new Completer () ;
3030
31- AsyncTestCompleter () {
32- _completer = new Completer ();
33- }
34-
35- done () {
31+ void done () {
3632 _completer.complete ();
3733 }
3834
39- get future => _completer.future;
35+ Future get future => _completer.future;
4036}
4137
42- testSetup () {
38+ void testSetup () {
4339 reflector.reflectionCapabilities = new ReflectionCapabilities ();
4440 // beforeEach configuration:
4541 // - Priority 3: clear the bindings before each test,
@@ -125,7 +121,7 @@ class NotExpect extends gns.NotExpect {
125121 Function get _expect => gns.guinness.matchers.expect;
126122}
127123
128- beforeEach (fn) {
124+ void beforeEach (fn) {
129125 if (fn is ! FunctionWithParamTokens ) fn = new FunctionWithParamTokens ([], fn);
130126 gns.beforeEach (() {
131127 fn.execute (_injector);
@@ -144,7 +140,7 @@ beforeEach(fn) {
144140 * bind(SomeToken).toValue(myValue),
145141 * ]);
146142 */
147- beforeEachBindings (fn) {
143+ void beforeEachBindings (Function fn) {
148144 gns.beforeEach (
149145 () {
150146 var bindings = fn ();
@@ -154,7 +150,7 @@ beforeEachBindings(fn) {
154150 );
155151}
156152
157- _it (gnsFn, name, fn) {
153+ void _it (gnsFn, name, fn) {
158154 if (fn is ! FunctionWithParamTokens ) fn = new FunctionWithParamTokens ([], fn);
159155 gnsFn (name, () {
160156 _inIt = true ;
@@ -165,20 +161,20 @@ _it(gnsFn, name, fn) {
165161}
166162
167163
168- it (name, fn) {
164+ void it (name, fn) {
169165 _it (gns.it, name, fn);
170166}
171167
172- iit (name, fn) {
168+ void iit (name, fn) {
173169 _it (gns.iit, name, fn);
174170}
175171
176- xit (name, fn) {
172+ void xit (name, fn) {
177173 _it (gns.xit, name, fn);
178174}
179175
180176class SpyFunction extends gns.SpyFunction {
181- SpyFunction (name): super (name);
177+ SpyFunction (String name): super (name);
182178
183179 // TODO: vsavkin move to guinness
184180 andReturn (value) {
0 commit comments