From a671ce6a47f25b1262620ddd3b0e3f2233969150 Mon Sep 17 00:00:00 2001 From: chee Date: Fri, 1 Jun 2018 10:09:12 +0100 Subject: [PATCH] Destructure in the name nest --- tests/yes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/yes.js b/tests/yes.js index 4ec0798..0c3f1cb 100644 --- a/tests/yes.js +++ b/tests/yes.js @@ -33,7 +33,7 @@ test('it should not die on good code', t => { test('it should transform correctly', t => { t.plan(2) - const name = runBabelInThisContext(` + const [, name] = runBabelInThisContext(` (() => { const string = "hello, jake"; const regex = /hello, (\\w+)/; @@ -42,7 +42,7 @@ test('it should transform correctly', t => { }); `)() - t.equals(name[1], 'jake') + t.equals(name, 'jake') const doesntmatch = runBabelInThisContext(` (() => {