@@ -34,13 +34,13 @@ interface ModeDef {
34
34
}
35
35
36
36
if ( DEBUG ) {
37
- module ( 'wait-for' , function ( hooks ) {
38
- hooks . afterEach ( function ( ) {
37
+ module ( 'wait-for' , function ( hooks ) {
38
+ hooks . afterEach ( function ( ) {
39
39
_reset ( ) ;
40
40
resetError ( ) ;
41
41
} ) ;
42
42
const generatorTestModules = [
43
- ( function ( ) {
43
+ ( function ( ) {
44
44
const EmberObjectThing = EmberObject . extend ( {
45
45
doStuffTask : taskFn (
46
46
waitFor ( function * doTaskStuff ( ...args : any ) {
@@ -108,7 +108,7 @@ if (DEBUG) {
108
108
109
109
testModules . forEach (
110
110
( { name, waiterName, EmberObjectThing, NativeThing } ) => {
111
- module ( name , function ( ) {
111
+ module ( name , function ( ) {
112
112
const invocationType = [
113
113
{
114
114
name : 'class function' ,
@@ -134,8 +134,8 @@ if (DEBUG) {
134
134
135
135
invocationType . forEach (
136
136
( { name, createPromise, createThrowingPromise } : ModeDef ) => {
137
- module ( name , function ( ) {
138
- test ( 'waitFor wraps and registers a waiter' , async function ( assert ) {
137
+ module ( name , function ( ) {
138
+ test ( 'waitFor wraps and registers a waiter' , async function ( assert ) {
139
139
overrideError ( MockStableError ) ;
140
140
141
141
const promise = createPromise ( ) ;
@@ -162,14 +162,14 @@ if (DEBUG) {
162
162
} ) ;
163
163
} ) ;
164
164
165
- test ( 'waitFor handles arguments and return value' , async function ( assert ) {
165
+ test ( 'waitFor handles arguments and return value' , async function ( assert ) {
166
166
overrideError ( MockStableError ) ;
167
167
168
168
const ret = await createPromise ( 1 , 'foo' ) ;
169
169
assert . deepEqual ( ret , [ 'foo' , 1 ] ) ;
170
170
} ) ;
171
171
172
- test ( 'waitFor transitions waiter to not pending even if promise throws when thenable wrapped' , async function ( assert ) {
172
+ test ( 'waitFor transitions waiter to not pending even if promise throws when thenable wrapped' , async function ( assert ) {
173
173
const promise = createThrowingPromise ( ) ;
174
174
175
175
try {
@@ -188,7 +188,7 @@ if (DEBUG) {
188
188
} ,
189
189
) ;
190
190
191
- module ( 'waitFor ember-concurrency interop' , function ( ) {
191
+ module ( 'waitFor ember-concurrency interop' , function ( ) {
192
192
class Deferred {
193
193
promise : Promise < any > ;
194
194
resolve : Function = ( ) => null ;
@@ -266,7 +266,7 @@ if (DEBUG) {
266
266
}
267
267
}
268
268
269
- test ( 'tasks with multiple yields work' , async function ( assert ) {
269
+ test ( 'tasks with multiple yields work' , async function ( assert ) {
270
270
const thing = new NativeThing ( ) ;
271
271
const task = perform ( thing . doStuffTask ) ;
272
272
@@ -299,7 +299,7 @@ if (DEBUG) {
299
299
] ;
300
300
301
301
cancellationCases . forEach ( ( { desc, taskName } ) => {
302
- test ( `${ desc } task cancellation works` , async function ( assert ) {
302
+ test ( `${ desc } task cancellation works` , async function ( assert ) {
303
303
const thing = new NativeThing ( ) ;
304
304
305
305
const instance = perform ( get ( thing , taskName ) ) ;
@@ -321,7 +321,7 @@ if (DEBUG) {
321
321
} ) ;
322
322
} ) ;
323
323
324
- module ( 'waitFor co interop' , function ( ) {
324
+ module ( 'waitFor co interop' , function ( ) {
325
325
function coDec (
326
326
_target : object ,
327
327
_key : string ,
@@ -395,7 +395,7 @@ if (DEBUG) {
395
395
}
396
396
}
397
397
398
- test ( 'it works' , async function ( assert ) {
398
+ test ( 'it works' , async function ( assert ) {
399
399
const thing = new NativeThing ( ) ;
400
400
401
401
thing . doStuffCo ( ) ;
@@ -416,7 +416,7 @@ if (DEBUG) {
416
416
} ) ;
417
417
} ) ;
418
418
419
- test ( 'types' , async function ( assert ) {
419
+ test ( 'types' , async function ( assert ) {
420
420
assert . expect ( 0 ) ;
421
421
422
422
async function asyncFn ( a : string , b : string ) {
0 commit comments