Debian Codegraph @

packages/babel-plugin-proposal-destructuring-private/test/fixtures/ordering/object-pattern/exec.js

raw
1 var log = [];
2
3 function push(x, y = x) { log.push(x); return y; }
4
5 class C {
6 static get a() { push(1) }
7 static get b() { push(6) }
8 static get c() { push(10) }
9 static get d() { push(13) }
10 static get #x() { push(3) };
11 static get #y() { return push(8, C) };
12 static {
13 var { [push(0, "a")]: a = push(2), #x: {
14 [push(5, "b")]: b = push(7),
15 #y: y = push(-1),
16 [push(9, "c")]: c = push(11)
17 } = push(4, C), [push(12, "d")]: d = push(14) } = C;
18 }
19 }
20
21 var nums = Array.from({ length: 15 }, (_, i) => i);
22 expect(log).toStrictEqual(nums);