diff --git a/app/astride/sandbox.test.js b/app/astride/sandbox.test.js index 47243d7..efbce4a 100644 --- a/app/astride/sandbox.test.js +++ b/app/astride/sandbox.test.js @@ -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(