From 717ff538fbb63edad6b767d213b7e9ab7d10460d Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 17 Jun 2022 21:56:33 -0700 Subject: [PATCH] fix(xsnap): XS error stack behavior change --- packages/xsnap/test/test-boot-lockdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/xsnap/test/test-boot-lockdown.js b/packages/xsnap/test/test-boot-lockdown.js index 85d652f4ba3f..843b686d382c 100644 --- a/packages/xsnap/test/test-boot-lockdown.js +++ b/packages/xsnap/test/test-boot-lockdown.js @@ -100,12 +100,12 @@ test('SES deep stacks work on xsnap', async t => { const send = msg => issueCommand(encoder.encode(JSON.stringify(msg)).buffer); const err = Error('msg'); - send('stack' in err); + send(err.stack); const msg = getStackString(err); send(msg); `); - const [stackInErr, msg] = opts.messages.map(s => JSON.parse(s)); - t.assert(!stackInErr); + const [stack, msg] = opts.messages.map(s => JSON.parse(s)); + t.is(stack, 'Error: msg'); // No frames t.is(typeof msg, 'string'); t.assert(msg.length >= 1); });