Skip to content
Snippets Groups Projects
S25.4.4.1_A2.3_T1.js 473 B
Newer Older
  • Learn to ignore specific revisions
  • // Copyright 2014 Cubane Canada, Inc.  All rights reserved.
    // See LICENSE for details.
    
    Brian Terlson's avatar
    Brian Terlson committed
    /*---
    
    info: Promise.all([]) returns a promise for a new empty array
    
    Brian Terlson's avatar
    Brian Terlson committed
    author: Sam Mikes
    
    description: Promise.all([]) returns a promise for an array
    
    Brian Terlson's avatar
    Brian Terlson committed
    ---*/
    
    
    var arg = [];
    
    Promise.all(arg).then(function (result) {
    
        if(!(result instanceof Array)) {
    
            $ERROR("expected an array from Promise.all, got " + result);
        }
    
    }).then($DONE, $DONE);