summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js
blob: ad9bfa6c4866da134ca7238b45af2e449c8e7c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |reftest| async
// Copyright 2014 Cubane Canada, Inc.  All rights reserved.
// See LICENSE for details.

/*---
info: Promise.all is resolved with a new empty array
es6id: 25.4.4.1_A2.3_T2
author: Sam Mikes
description: Promise.all([]) returns a Promise for an empty array
flags: [async]
---*/

var arg = [];

Promise.all(arg).then(function(result) {
  assert.sameValue(result.length, 0, 'The value of result.length is expected to be 0');
}).then($DONE, $DONE);