@@ -287,95 +287,6 @@ void main() {
287
287
data: "" , functions: jsify ({"foo(" : allowInterop (neverCalled)})));
288
288
expect (error.toString (), contains ('Invalid signature' ));
289
289
});
290
-
291
- group ("with fibers" , () {
292
- setUpAll (() {
293
- try {
294
- fiber;
295
- } catch (_) {
296
- throw "Can't load fibers package.\n "
297
- "Run pub run grinder before-test." ;
298
- }
299
- });
300
-
301
- test ("runs a synchronous function" , () {
302
- expect (
303
- render (RenderOptions (
304
- data: "a {b: foo()}" ,
305
- functions: jsify ({
306
- "foo" : allowInterop (
307
- (void _) => callConstructor (sass.types.Number , [1 ]))
308
- }),
309
- fiber: fiber)),
310
- completion (equalsIgnoringWhitespace ("a { b: 1; }" )));
311
- });
312
-
313
- test ("runs an asynchronous function" , () {
314
- expect (
315
- render (RenderOptions (
316
- data: "a {b: foo()}" ,
317
- functions: jsify ({
318
- "foo" : allowInterop ((void done (Object result)) {
319
- Timer (Duration .zero, () {
320
- done (callConstructor (sass.types.Number , [1 ]));
321
- });
322
- })
323
- }),
324
- fiber: fiber)),
325
- completion (equalsIgnoringWhitespace ("a { b: 1; }" )));
326
- });
327
-
328
- test ("reports a synchronous error" , () async {
329
- var error = await renderError (RenderOptions (
330
- data: "a {b: foo()}" ,
331
- functions:
332
- jsify ({"foo" : allowInterop ((void _) => throw "aw beans" )}),
333
- fiber: fiber));
334
- expect (error.toString (), contains ('aw beans' ));
335
- });
336
-
337
- test ("reports an asynchronous error" , () async {
338
- var error = await renderError (RenderOptions (
339
- data: "a {b: foo()}" ,
340
- functions: jsify ({
341
- "foo" : allowInterop ((void done (Object result)) {
342
- Timer (Duration .zero, () {
343
- done (JSError ("aw beans" ));
344
- });
345
- })
346
- }),
347
- fiber: fiber));
348
- expect (error.toString (), contains ('aw beans' ));
349
- });
350
-
351
- test ("reports a null return" , () async {
352
- var error = await renderError (RenderOptions (
353
- data: "a {b: foo()}" ,
354
- functions: jsify ({
355
- "foo" : allowInterop ((void done (Object result)) {
356
- Timer (Duration .zero, () {
357
- done (null );
358
- });
359
- })
360
- }),
361
- fiber: fiber));
362
- expect (error.toString (), contains ('must be a Sass value type' ));
363
- });
364
-
365
- test ("reports a call to done without arguments" , () async {
366
- var error = await renderError (RenderOptions (
367
- data: "a {b: foo()}" ,
368
- functions: jsify ({
369
- "foo" : allowInterop ((void done ()) {
370
- Timer (Duration .zero, () {
371
- done ();
372
- });
373
- })
374
- }),
375
- fiber: fiber));
376
- expect (error.toString (), contains ('must be a Sass value type' ));
377
- });
378
- });
379
290
});
380
291
381
292
// Node Sass currently doesn't provide any representation of first-class
0 commit comments