summaryrefslogtreecommitdiff
path: root/src/dstr-binding/ary-ptrn-elision-iter-close.case
blob: 18c0046a3a416751d99eb99da2addc420cecae60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
template: iter-close
desc: >
  The iterator is properly consumed by the destructuring pattern
---*/

//- setup
const iter = (function* () {
  yield;
  yield;
})();

//- elems
[,]
//- iter
iter
//- assertions
assert.sameValue(iter.next().done, true, 'iteration occurred as expected');