todo: assignment pattern
This commit is contained in:
parent
dd675efa5c
commit
df56438656
|
@ -446,6 +446,26 @@ test('executes member expressions', async () => {
|
|||
});
|
||||
});
|
||||
|
||||
test.todo('declares with assignment pattern', async () => {
|
||||
let sandbox;
|
||||
sandbox = new Sandbox(
|
||||
await parse(`
|
||||
const {Player: {id: owner = 0} = {}, Position} = {};
|
||||
owner;
|
||||
`),
|
||||
);
|
||||
expect(sandbox.run().value)
|
||||
.to.equal(0);
|
||||
sandbox = new Sandbox(
|
||||
await parse(`
|
||||
const {Player: {id: [owner = 0]} = {id: []}, Position} = {};
|
||||
owner;
|
||||
`),
|
||||
);
|
||||
expect(sandbox.run().value)
|
||||
.to.equal(0);
|
||||
});
|
||||
|
||||
test('handles nested yields', async () => {
|
||||
expect(
|
||||
await finish(new Sandbox(
|
||||
|
|
Loading…
Reference in New Issue
Block a user