fix destructuring of empty string (#13444)

* fix destructuring empty string

* use variable on expect

* overwrite all tests

* fix test cases
This commit is contained in:
Lively
2021-06-15 00:07:12 +09:00
committed by GitHub
parent 903b600522
commit 950d3519e8
5 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
let [a] = '';
expect(a).toBe(undefined)

View File

@@ -0,0 +1 @@
let [a] = '';

View File

@@ -0,0 +1,3 @@
var _ref = '',
_ref2 = babelHelpers.slicedToArray(_ref, 1),
a = _ref2[0];