Skip to content

Commit

Permalink
Destructure in the name nest
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Jun 1, 2018
1 parent a3913f0 commit a671ce6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/yes.js
Expand Up @@ -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+)/;
Expand All @@ -42,7 +42,7 @@ test('it should transform correctly', t => {
});
`)()

t.equals(name[1], 'jake')
t.equals(name, 'jake')

const doesntmatch = runBabelInThisContext(`
(() => {
Expand Down

0 comments on commit a671ce6

Please sign in to comment.